pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6309: ECPG pre-processor issue
3+ messages / 2 participants
[nested] [flat]
* BUG #6309: ECPG pre-processor issue
@ 2011-11-25 12:51 Andrew Milne <Andrew.Milne@iongeo.com>
2011-12-18 17:50 ` Re: BUG #6309: ECPG pre-processor issue Michael Meskes <meskes@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Milne @ 2011-11-25 12:51 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 6309
Logged by: Andrew Milne
Email address: Andrew.Milne@iongeo.com
PostgreSQL version: 8.4.9
Operating system: Red Hat Enterprise Linux Workstation release 6.1
(Santiago)
Description: ECPG pre-processor issue
Details:
NOTE: While I've not tested on 9.1 I can see the same code exists in that
release and as such the error will most likely still occur. Unfortunately I
can't upgrade from 8.4.9 due to project wide considerations.
The ECPG pre-processor seems to be incorrectly reporting an error when
parsing "EXEC SQL AT :cnx DEALLOCATE..." style commands.
For example:
===============================================
EXEC SQL AT :cnx DEALLOCATE thestatementname;
===============================================
results in the pre-processor outputting an error:
===============================================
src.pcpp:1000: ERROR: AT option not allowed in DEALLOCATE statement
===============================================
However if you examine the generated src.cpp file it appears to have
correctly generated code that uses the connection:
===============================================
{ ECPGdeallocate(__LINE__, 0, cnx, "thestatementname");
===============================================
And examining the source code for ECPGdeallocate it correctly handles the
supplied connection.
Examining the pre-processor (preproc.y) seems to show this error has no
impact on the actual processing of the file and is probably just a holdover
from earlier versions of ECPG.
The project I'm working on has multiple ECPG connections open and we need to
be able to prepare and deallocate to the correct connection. Our intention
is to simply ignore the preprocessor error at this time but it would be good
to:
1. Get some confirmation that this is safe to do
2. If someone with a decent knowledge of postgress could actually look into
fixing the issue it would be appreciated (my understanding is limited and I
wouldn't be confident putting forward a patch myself).
Thanks
A Milne
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #6309: ECPG pre-processor issue
2011-11-25 12:51 BUG #6309: ECPG pre-processor issue Andrew Milne <Andrew.Milne@iongeo.com>
@ 2011-12-18 17:50 ` Michael Meskes <meskes@postgresql.org>
2011-12-19 09:37 ` Re: BUG #6309: ECPG pre-processor issue Andrew Milne <Andrew.Milne@iongeo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Meskes @ 2011-12-18 17:50 UTC (permalink / raw)
To: Andrew Milne <Andrew.Milne@iongeo.com>; +Cc: pgsql-bugs
On Fri, Nov 25, 2011 at 12:51:51PM +0000, Andrew Milne wrote:
> The ECPG pre-processor seems to be incorrectly reporting an error when
> parsing "EXEC SQL AT :cnx DEALLOCATE..." style commands.
Thanks for bringing this up. These checks seem to be leftovers from the old
code that only emulated prepare statments. I've removed the checks for all
versions starting at 8.4. The next release should be fine for you.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at googlemail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #6309: ECPG pre-processor issue
2011-11-25 12:51 BUG #6309: ECPG pre-processor issue Andrew Milne <Andrew.Milne@iongeo.com>
2011-12-18 17:50 ` Re: BUG #6309: ECPG pre-processor issue Michael Meskes <meskes@postgresql.org>
@ 2011-12-19 09:37 ` Andrew Milne <Andrew.Milne@iongeo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Milne @ 2011-12-19 09:37 UTC (permalink / raw)
To: meskes@postgresql.org; +Cc: pgsql-bugs
That's great.
Thanks for doing this and getting back to us.
Andrew Milne
On 18/12/11 17:50, Michael Meskes wrote:
> On Fri, Nov 25, 2011 at 12:51:51PM +0000, Andrew Milne wrote:
>> The ECPG pre-processor seems to be incorrectly reporting an error when
>> parsing "EXEC SQL AT :cnx DEALLOCATE..." style commands.
> Thanks for bringing this up. These checks seem to be leftovers from the old
> code that only emulated prepare statments. I've removed the checks for all
> versions starting at 8.4. The next release should be fine for you.
>
> Michael
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-12-19 09:37 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-25 12:51 BUG #6309: ECPG pre-processor issue Andrew Milne <Andrew.Milne@iongeo.com>
2011-12-18 17:50 ` Michael Meskes <meskes@postgresql.org>
2011-12-19 09:37 ` Andrew Milne <Andrew.Milne@iongeo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox