Re: PL/pgSQL's "open cur for execute" provides workarouned... Re: cursors with prepared statements

2023-04-16 Thread Bryn Llewellyn
> adrian.kla...@aklaver.com wrote: > >> b...@yugabyte.com wrote: >> >> It seems that there must be different underlying mechanisms at work and that >> this explains why creating a cursor using SQL to execute a prepared >> statement fails but doing this using PL/pgSQL succeeds. What's going on

Re: PL/pgSQL's "open cur for execute" provides workarouned... Re: cursors with prepared statements

2023-04-16 Thread Adrian Klaver
On 4/16/23 11:02, Bryn Llewellyn wrote:> statement fails but doing this using PL/pgSQL succeeds. What's going on under the covers? Pretty sure: https://www.postgresql.org/docs/current/spi.html -- Adrian Klaver adrian.kla...@aklaver.com

PL/pgSQL's "open cur for execute" provides workarouned... Re: cursors with prepared statements

2023-04-16 Thread Bryn Llewellyn
> b...@yugabyte.com wrote: > >> david.g.johns...@gmail.com wrote: >> >>> b...@yugabyte.com wrote: >>> >>> I found this email from Peter Eisentraut: >>> https://www.postgresql.org/message-id/762cc764-74f0-13fb-77ed-16f91c90f40d%402ndquadrant.com >>> >>> It caused the 42601 error, « syntax error

Re: cursors with prepared statements

2023-04-15 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > >> b...@yugabyte.com wrote: >> >> I found this email from Peter Eisentraut: >> https://www.postgresql.org/message-id/762cc764-74f0-13fb-77ed-16f91c90f40d%402ndquadrant.com >> >> It caused the 42601 error, « syntax error at or near “execute” ». So it >> look

Re: cursors with prepared statements

2023-04-15 Thread David G. Johnston
On Sat, Apr 15, 2023 at 2:15 PM Bryn Llewellyn wrote: > I found this email from Peter Eisentraut: > > https://www.postgresql.org/message-id/762cc764-74f0-13fb-77ed-16f91c90f40d%402ndquadrant.com > > It caused the 42601 error, « syntax error at or near “execute” ». So it > looks like Peter’s patch

Re: cursors with prepared statements

2023-04-15 Thread Bryn Llewellyn
I found this email from Peter Eisentraut: https://www.postgresql.org/message-id/762cc764-74f0-13fb-77ed-16f91c90f40d%402ndquadrant.com > I have developed a patch that allows declaring cursors over prepared > statements... This is an SQL standard feature. ECPG already supports it (with > differen