Reputation: 14258
Is there a way of controlling asynchronous flow within postgres using plpgsql?
I know there are parallel queries so can the statements also be parallelised?
DECLARE
JSONB res1
JSONB res2
BEGIN
res1 := select * ...
res2 := func2();
return func3(res1, res2)
END
I'd like to be able to specify that the calls for res1
and res2
can be run in parallel within postgres itself.
Upvotes: 0
Views: 574
Reputation: 246718
To run two SQL statements in parallel, you need two database connections.
Upvotes: 2