| From: | leif(at)crysberg(dot)dk |
|---|---|
| To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | ECPG Deallocate PREPARE statement - bug ? |
| Date: | 2009-07-23 11:52:27 |
| Message-ID: | 27965575.198751248349947629.JavaMail.root@quick |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi guys,
I have a program that I need compile using PostgreSQL 8.4.0 (or later) and it must be able to run on an 8.3.5 based system as well as 8.4.0. I'm using embedded SQL for C and I have the following sequence of statements:
snprintf( stmt, 3000, "SELECT count(*) FROM %s WHERE %s", *table, *where );
EXEC SQL AT :_thisDbConn PREPARE cntstmt FROM :stmt;
EXEC SQL AT :_thisDbConn EXECUTE cntstmt INTO :recCount :fnull;
.
.
EXEC SQL DEALLOCATE PREPARE cntstmt;
This seems to be ok running on the 8.4.0 system, but when running it on the 8.3.5, it complains that it is an 'Invalid statement name cntstmt' for the deallocation.
I then tried to add the 'AT :_thisDbConn' to the DEALLOCATE statement, but ecpg complained that there was no "at" allowed for deallocate. However, looking at the output (the .c file) I noticed that it had generated an apparently correct ECPG_deallocate() call. Manually compiling this and linking the program turned out to be able to run on both the 8.3.5 and the 8.4.0 system without problems.
Is this a bug in ecpg or am I doing something wrong ?
Please advise,
Leif
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Kellerer | 2009-07-23 12:12:58 | Re: comparing NEW and OLD (any good this way?) |
| Previous Message | Pavel Stehule | 2009-07-23 11:45:36 | Re: comparing NEW and OLD (any good this way?) |