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

2013-11-28 Thread Boszormenyi Zoltan
2013-11-29 04:56 keltezéssel, Peter Eisentraut írta: On Wed, 2013-11-27 at 18:17 -0500, Tom Lane wrote: Hm. So you're suggesting that ECPG fix this problem by inserting an explicit NO SCROLL clause into translated DECLARE CURSOR commands, if there's not a SCROLL clause? I wouldn't go that far

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

2013-11-28 Thread Peter Eisentraut
On Wed, 2013-11-27 at 18:17 -0500, Tom Lane wrote: > Hm. So you're suggesting that ECPG fix this problem by inserting an > explicit NO SCROLL clause into translated DECLARE CURSOR commands, if > there's not a SCROLL clause? I wouldn't go that far yet. Do I understand this right that the future r

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

2013-11-28 Thread Boszormenyi Zoltan
2013-11-28 09:55 keltezéssel, Michael Meskes írta: On Thu, Nov 28, 2013 at 09:04:17AM +0100, Boszormenyi Zoltan wrote: Well, technically, unspecified means NO SCROLL according to the SQL standard. A lot of applications in ECPG are ported from other systems, That means by automatically adding a

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

2013-11-28 Thread Michael Meskes
On Thu, Nov 28, 2013 at 09:04:17AM +0100, Boszormenyi Zoltan wrote: > >>Well, technically, unspecified means NO SCROLL according to the SQL > >>standard. A lot of applications in ECPG are ported from other systems, That means by automatically adding a literal NO SCROLL to the command we obey stan

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

2013-11-28 Thread Boszormenyi Zoltan
2013-11-28 00:17 keltezéssel, Tom Lane írta: Peter Eisentraut writes: On 11/27/13, 3:47 PM, Tom Lane wrote: Given these considerations, I think it'd be better to allow explicit application control over whether read-ahead happens for a particular query. And I have no problem whatsoever with re

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

2013-11-27 Thread Boszormenyi Zoltan
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 scroll

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

2013-11-27 Thread Tom Lane
Peter Eisentraut writes: > On 11/27/13, 3:47 PM, Tom Lane wrote: >> Given these considerations, I think it'd be better to allow explicit >> application control over whether read-ahead happens for a particular >> query. And I have no problem whatsoever with requiring that the cursor >> be explicit

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

2013-11-27 Thread Peter Eisentraut
On 11/27/13, 3:47 PM, Tom Lane wrote: > Given these considerations, I think it'd be better to allow explicit > application control over whether read-ahead happens for a particular > query. And I have no problem whatsoever with requiring that the cursor > be explicitly marked SCROLL or NO SCROLL be

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

2013-11-27 Thread Peter Eisentraut
On 11/27/13, 2:49 PM, Alvaro Herrera wrote: > 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? That might make sense. I think this case is similar to the question whether a view is updatable. You wouldn't put that inf

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

2013-11-27 Thread Tom Lane
Boszormenyi Zoltan writes: > 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; I

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

2013-11-27 Thread Alvaro Herrera
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;

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

2013-11-27 Thread Boszormenyi Zoltan
2013-11-27 19:16 keltezéssel, Tom Lane írta: Boszormenyi Zoltan writes: 2013-11-23 22:01 keltezéssel, Tom Lane írta: Boszormenyi Zoltan writes: Attached is the patch that modified the command tag returned by the DECLARE CURSOR command. It returns "DECLARE SCROLL CURSOR" or "DECLARE NO SCROLL

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

2013-11-27 Thread Tom Lane
Boszormenyi Zoltan writes: > 2013-11-23 22:01 keltezéssel, Tom Lane írta: >> Boszormenyi Zoltan writes: >>> Attached is the patch that modified the command tag returned by >>> the DECLARE CURSOR command. It returns "DECLARE SCROLL CURSOR" >>> or "DECLARE NO SCROLL CURSOR" depending on the cursor'

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

2013-11-27 Thread Boszormenyi Zoltan
2013-11-23 22:01 keltezéssel, Tom Lane írta: Boszormenyi Zoltan writes: Attached is the patch that modified the command tag returned by the DECLARE CURSOR command. It returns "DECLARE SCROLL CURSOR" or "DECLARE NO SCROLL CURSOR" depending on the cursor's scrollable flag that can be determined i

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

2013-11-23 Thread Tom Lane
Boszormenyi Zoltan writes: > Attached is the patch that modified the command tag returned by > the DECLARE CURSOR command. It returns "DECLARE SCROLL CURSOR" > or "DECLARE NO SCROLL CURSOR" depending on the cursor's > scrollable flag that can be determined internally even if neither is > asked exp