From: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
---|---|
To: | Michael Meskes <meskes(at)postgresql(dot)org> |
Cc: | PG Hackers <pgsql-hackers(at)postgresql(dot)org>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at> |
Subject: | Re: DECLARE doesn't set/reset sqlca after DECLARE cursor |
Date: | 2009-08-14 11:02:07 |
Message-ID: | 4A85442F.9060306@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 see a reason for
> different behaviour depending on where the command is located.
>
>
>> the Informix behaviour. We can limit it it compat mode, though.
>>
>
> So let's first figure out exactly how Informix handles things. Zoltan, do you
> have access to esql the Informix precompiler? If so, please run two simple
> tests, one with just a DECLARE statement and one with a DECLARE statement in a
> function and post the results please.
>
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.
Best regards,
Zoltán Böszörményi
--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/
Attachment | Content-Type | Size |
---|---|---|
test1.c | text/x-csrc | 2.8 KB |
test1.ec | text/plain | 420 bytes |
test2.c | text/x-csrc | 2.8 KB |
test2.ec | text/plain | 421 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | decibel | 2009-08-14 11:20:51 | Re: contrib/pg_freespacemap |
Previous Message | Oleg Bartunov | 2009-08-14 10:52:27 | Re: Filtering dictionaries support and unaccent dictionary |