From: Andrew Milne <Andrew.Milne@iongeo.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #6309: ECPG pre-processor issue
Date: Fri, 25 Nov 2011 12:51:51 GMT
Message-ID: <201111251251.pAPCppNC077000@wwwmaster.postgresql.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Andrew.Milne@iongeo.com
Subject: Re: BUG #6309: ECPG pre-processor issue
In-Reply-To: <201111251251.pAPCppNC077000@wwwmaster.postgresql.org>
References: <201111251251.pAPCppNC077000@wwwmaster.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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