Re: [HACKERS] Problems with variable cursorname in ecpg

2010-04-01 Thread Michael Meskes
On Wed, Mar 31, 2010 at 01:15:20PM +0200, Boszormenyi Zoltan wrote: > I was thinking about something like the attached patch. > It passes all the regression tests. Thanks. Applied. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaF

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-31 Thread Boszormenyi Zoltan
Michael Meskes írta: > On Wed, Mar 31, 2010 at 10:35:31AM +0200, Boszormenyi Zoltan wrote: > >>> I think we should make the error message/documentation a little bit >>> clearer as >>> people have stumbled over it. >>> >> Yes, we need to document it. >> > > I changed the error messa

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-31 Thread Boszormenyi Zoltan
Boszormenyi Zoltan írta: > Boszormenyi Zoltan írta: > >> I think you forget that in this case, only global variables are >> usable in the DECLARE in this case, no local variables in >> functions preceding the DECLARE are visible to it. >> >> What we need here is an extra check in ECPGdump_a_type

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-31 Thread Boszormenyi Zoltan
Boszormenyi Zoltan írta: > I think you forget that in this case, only global variables are > usable in the DECLARE in this case, no local variables in > functions preceding the DECLARE are visible to it. > > What we need here is an extra check in ECPGdump_a_type(). > We need to raise an error if >

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-31 Thread Michael Meskes
On Wed, Mar 31, 2010 at 10:35:31AM +0200, Boszormenyi Zoltan wrote: > > I think we should make the error message/documentation a little bit > > clearer as > > people have stumbled over it. > > Yes, we need to document it. I changed the error message and documented a possible improvement in the

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-31 Thread Boszormenyi Zoltan
Michael Meskes írta: >> The interpretation of the standard in the above way (DECLARE is declarative, >> ... >> > > It's not just interpretation, but also a regression if we were to change this. > Obviously. >> The uniqueness problem can only be solved with modifying >> the runtime library

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-30 Thread Michael Meskes
> The interpretation of the standard in the above way (DECLARE is declarative, > ... It's not just interpretation, but also a regression if we were to change this. > The uniqueness problem can only be solved with modifying > the runtime library to keep track of the cursor names in the client. > I

Re: [HACKERS] Problems with variable cursorname in ecpg

2010-03-29 Thread Boszormenyi Zoltan
Hi, Michael Meskes írta: > Hi, > > I did some more testing on ecpg and found that allowing variables as cursor > names seems to produce more problems than I anticipated. But then maybe it's > just some missing checks to throw out error messages. Anyway, I attach a small > test program that, from m

[HACKERS] Problems with variable cursorname in ecpg

2010-03-29 Thread Michael Meskes
Hi, I did some more testing on ecpg and found that allowing variables as cursor names seems to produce more problems than I anticipated. But then maybe it's just some missing checks to throw out error messages. Anyway, I attach a small test program that, from my understanding, should work, but dos