Re: Protocol question regarding Portal vs Cursor

2024-07-28 Thread Dave Cramer
On Sat, 27 Jul 2024 at 19:06, Tatsuo Ishii wrote: > > Yes, sorry, I should have said one can not create a with hold portal > using > > the BIND command > > Ok. > > It would be possible to add a new parameter to the BIND command to > create such a portal. But it needs some changes to the existing

Re: Protocol question regarding Portal vs Cursor

2024-07-27 Thread Tatsuo Ishii
> Yes, sorry, I should have said one can not create a with hold portal using > the BIND command Ok. It would be possible to add a new parameter to the BIND command to create such a portal. But it needs some changes to the existing protocol definition and requires protocol version up, which is a m

Re: Protocol question regarding Portal vs Cursor

2024-07-27 Thread Tom Lane
Dave Cramer writes: > On Sat, 27 Jul 2024 at 01:55, Tatsuo Ishii wrote: >>> So while the API's are "virtually" identical AFAICT there is no way to >>> create a "WITH HOLD" portal ? > Yes, sorry, I should have said one can not create a with hold portal using > the BIND command Yeah. The two API

Re: Protocol question regarding Portal vs Cursor

2024-07-27 Thread Dave Cramer
Dave Cramer On Sat, 27 Jul 2024 at 01:55, Tatsuo Ishii wrote: > > So while the API's are "virtually" identical AFAICT there is no way to > > create a "WITH HOLD" portal ? > > I am not sure if I fully understand your question but I think you can > create a portal with "WITH HOLD" option. > > BEG

Re: Protocol question regarding Portal vs Cursor

2024-07-26 Thread Tatsuo Ishii
> So while the API's are "virtually" identical AFAICT there is no way to > create a "WITH HOLD" portal ? I am not sure if I fully understand your question but I think you can create a portal with "WITH HOLD" option. BEGIN; DECLARE c CURSOR WITH HOLD FOR SELECT * FROM generate_series(1,10); (of c

Re: Protocol question regarding Portal vs Cursor

2024-07-26 Thread Dave Cramer
On Thu, 25 Jul 2024 at 17:52, Dave Cramer wrote: > > > On Thu, 25 Jul 2024 at 16:19, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Thursday, July 25, 2024, Dave Cramer wrote: >> >> May not make a difference but… >> >> >>> 2024-07-25 15:55:39 FINEST org.postgresql.core.v3.Query

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread Dave Cramer
On Thu, 25 Jul 2024 at 16:19, David G. Johnston wrote: > On Thursday, July 25, 2024, Dave Cramer wrote: > > May not make a difference but… > > >> 2024-07-25 15:55:39 FINEST org.postgresql.core.v3.QueryExecutorImpl >> sendSimpleQuery FE=> SimpleQuery(query="declare C_3 CURSOR WITHOUT HOLD >> FOR

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread David G. Johnston
On Thursday, July 25, 2024, Dave Cramer wrote: May not make a difference but… > 2024-07-25 15:55:39 FINEST org.postgresql.core.v3.QueryExecutorImpl > sendSimpleQuery FE=> SimpleQuery(query="declare C_3 CURSOR WITHOUT HOLD > FOR SELECT * FROM testsps WHERE id = 2") > You named the cursor c_3 (

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread Dave Cramer
Hi Tom, On Wed, 8 Nov 2023 at 06:02, Dave Cramer wrote: > > Dave Cramer > > > On Tue, 7 Nov 2023 at 10:26, Tom Lane wrote: > >> Dave Cramer writes: >> > If we use a Portal it is possible to open the portal and do a describe >> and >> > then Fetch N records. >> >> > Using a Cursor we open t

Re: Protocol question regarding Portal vs Cursor

2023-11-08 Thread Dave Cramer
Dave Cramer On Tue, 7 Nov 2023 at 10:26, Tom Lane wrote: > Dave Cramer writes: > > If we use a Portal it is possible to open the portal and do a describe > and > > then Fetch N records. > > > Using a Cursor we open the cursor. Is there a corresponding describe and > a > > way to fetch N record

Re: Protocol question regarding Portal vs Cursor

2023-11-07 Thread Tom Lane
Dave Cramer writes: > If we use a Portal it is possible to open the portal and do a describe and > then Fetch N records. > Using a Cursor we open the cursor. Is there a corresponding describe and a > way to fetch N records without getting the fields each time. Currently we > have to send the SQL

Protocol question regarding Portal vs Cursor

2023-11-07 Thread Dave Cramer
Greetings, If we use a Portal it is possible to open the portal and do a describe and then Fetch N records. Using a Cursor we open the cursor. Is there a corresponding describe and a way to fetch N records without getting the fields each time. Currently we have to send the SQL "fetch N" and we