Re: Options for protocol level cursors - Mailing list pgsql-hackers

From James William Pye
Subject Re: Options for protocol level cursors
Date
Msg-id 5C636ADD-0006-41E1-9801-8AAAA0651F47@jwp.name
Whole thread Raw
In response to Re: Options for protocol level cursors  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Options for protocol level cursors  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jun 12, 2008, at 3:59 PM, Tom Lane wrote:
> Sure, but if you're willing to use a SQL-level operation on the portal
> then you could perfectly well declare the cursor at SQL level too.

Indeed, but like I said in my initial e-mail::
   I know you can use DECLARE, but I believe that this inhibits the   driver from being able to select the transfer
formatfor individual   columns; it's all binary or it's all text. Also, I don't think I   can DECLARE against a
preparedstatement, save restating the  
 
query, no?

Also, the latter has other problems wrt statement parameters. I guess  
you
could prepare(protocol level) the DECLARE, but that seems like a gross
workaround as it defeats the purpose of prepared statements by forcing  
you
to create a new statement for each cursor that you plan to open. Of  
course,
unless you can close the existing one before opening the next one.

[ I really do hope that I'm missing something, btw :( ]


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: How to Sponsor a Feature
Next
From: Tom Lane
Date:
Subject: Re: b64_encode and decode