Re: Options for protocol level cursors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James William Pye <pgsql(at)jwp(dot)name>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Options for protocol level cursors
Date: 2008-06-12 23:45:40
Message-ID: 16085.1213314340@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

James William Pye <pgsql(at)jwp(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2008-06-13 00:55:46 Re: Better default_statistics_target
Previous Message Tom Lane 2008-06-12 23:42:04 Re: b64_encode and decode