Re: Retrieve results in PostgreSQL stored procedure allowing query parallelism

2023-11-21 Thread David G. Johnston
On Tue, Nov 21, 2023 at 11:31 AM Joan Pujol wrote: > If I try to do something like: > EXECUTE SELECT INTO ARRAY_AGG(t.*) INTO result_records > Would internally use cursors too and have the same restrictions? > > Producing a single row single column result and then storing it into a variable

Re: Retrieve results in PostgreSQL stored procedure allowing query parallelism

2023-11-21 Thread Joan Pujol
Thanks, David. If I try to do something like: EXECUTE SELECT INTO ARRAY_AGG(t.*) INTO result_records Would internally use cursors too and have the same restrictions? Cheers, On Tue, 21 Nov 2023 at 19:22, David G. Johnston wrote: > > On Tue, Nov 21, 2023, 11:10 Joan Pujol wrote: >> >> I want

Re: Retrieve results in PostgreSQL stored procedure allowing query parallelism

2023-11-21 Thread David G. Johnston
On Tue, Nov 21, 2023, 11:10 Joan Pujol wrote: > I want to execute an SQL query and process its results inside a stored > procedure without preventing query parallelism. Since I don't want to > prevent query parallelism, cursors can't be used, and I would like to > avoid creating a temporal

Retrieve results in PostgreSQL stored procedure allowing query parallelism

2023-11-21 Thread Joan Pujol
I want to execute an SQL query and process its results inside a stored procedure without preventing query parallelism. Since I don't want to prevent query parallelism, cursors can't be used, and I would like to avoid creating a temporal table. Is this possible? If so, what is the best way to