Re: [HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-14 Thread Boszormenyi Zoltan
Michael Meskes írta: > On Fri, Aug 14, 2009 at 01:02:07PM +0200, Boszormenyi Zoltan wrote: > >> Here are the two test files, with their preprocessed C output. >> Indeed, Informix emits a function call for DECLARE CURSOR. >> And it seems it's not legal to do this outside of a function. >> >

Re: [HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-14 Thread Michael Meskes
On Fri, Aug 14, 2009 at 01:02:07PM +0200, Boszormenyi Zoltan wrote: > Here are the two test files, with their preprocessed C output. > Indeed, Informix emits a function call for DECLARE CURSOR. > And it seems it's not legal to do this outside of a function. Okay, thanks. I changed several things i

Re: [HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-14 Thread Boszormenyi Zoltan
Michael Meskes írta: > On Thu, Aug 13, 2009 at 05:55:53PM +0200, Boszormenyi Zoltan wrote: > >> Okay, so it's a declarative command. But if we're in a function, >> we should still emit a call to ecpg_init, to be able to follow >> > > No, either it is declarative or it is not, but I don't se

Re: [HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-14 Thread Michael Meskes
On Thu, Aug 13, 2009 at 05:55:53PM +0200, Boszormenyi Zoltan wrote: > Okay, so it's a declarative command. But if we're in a function, > we should still emit a call to ecpg_init, to be able to follow No, either it is declarative or it is not, but I don't see a reason for different behaviour depend

Re: [HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-13 Thread Boszormenyi Zoltan
Michael Meskes írta: > On Wed, Aug 12, 2009 at 07:13:44PM +0200, Boszormenyi Zoltan wrote: > >> a customer of us complained a behavioural difference >> ... >> The attached patch implements this. The only downside >> is that now DECLARE CURSOR cannot appear outside >> of a function, a change in t

Re: [HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-13 Thread Michael Meskes
On Wed, Aug 12, 2009 at 07:13:44PM +0200, Boszormenyi Zoltan wrote: > a customer of us complained a behavioural difference > ... > The attached patch implements this. The only downside > is that now DECLARE CURSOR cannot appear outside > of a function, a change in test/preproc/variable.pgc reflects

[HACKERS] DECLARE doesn't set/reset sqlca after DECLARE cursor

2009-08-12 Thread Boszormenyi Zoltan
Hi, a customer of us complained a behavioural difference between ESQL/C and ECPG. They check sqlca.sqlcode almost everywhere in their application currently under porting to PostgreSQL. Somewhere in their code however there was a place where a statement error was ignored and the error was reported