Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Boszormenyi Zoltan <zb@cybertec.at>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Michael Meskes <meskes@postgresql.org>, Noah Misch <noah@leadboat.com>, Peter Eisentraut <peter_e@gmx.net>, Robert Haas <robertmhaas@gmail.com>, PG Hackers <pgsql-hackers@postgresql.org>, Heikki Linnakangas <hlinnakangas@vmware.com>, Bruce Momjian <bruce@momjian.us>, Hans-Jürgen Schönig <hs@cybertec.at>
Date: 2013-11-27T19:49:01Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix some "translator:" comments mangled by pgindent

  2. Make sure float4in/float8in accept all standard spellings of "infinity".

Boszormenyi Zoltan escribió:

> If you consider all these:
> 
> - certain combinations of query and DECLARE stmt flags fail;
> - adding NO SCROLL is breaking backward compatibility;
> - the readahead code has to really know whether the cursor is
>   scrollable so it can behave just like the server;
> 
> then returning the SCROLL / NO SCROLL flag in the command tag is
> not a bad solution in my view. In fact, this was the only workable
> solution I could come up with to make it work reliably when neither
> SCROLL nor NO SCROLL is specified by the application.

Would it work to have a function of some sort to which you give a cursor
name and it returns whether it is scrollable or not?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services