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

From Tom Lane
Subject Re: Options for protocol level cursors
Date
Msg-id 16085.1213314340@sss.pgh.pa.us
Whole thread Raw
In response to Re: Options for protocol level cursors  (James William Pye <pgsql@jwp.name>)
Responses Re: Options for protocol level cursors  (James William Pye <pgsql@jwp.name>)
List pgsql-hackers
James William Pye <pgsql@jwp.name> writes:
> 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 format for individual
>     columns; it's all binary or it's all text.

Huh?  I don't see why... you might have such a limitation in a
particular driver, but not in the protocol.

> 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.

Well, using a query for a cursor is grounds for replanning anyway,
because you might want a fast-start plan in such a case.  And it's
*definitely* grounds for replanning if you are asking for SCROLL
capability --- the plan stored for a regular prepared statement
very likely can't support that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: b64_encode and decode
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Better default_statistics_target