Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag - Mailing list pgsql-hackers

From Boszormenyi Zoltan
Subject Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag
Date
Msg-id 5296F511.1090304@cybertec.at
Whole thread Raw
In response to Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
2013-11-27 20:49 keltezéssel, Alvaro Herrera írta:
> 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?

D'oh. Yes, that would also work. Thanks for the idea. :-)
I will implement it and adapt my remaining patches.

Best regards,
Zoltán Böszörményi

-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de     http://www.postgresql.at/




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag