BUG #5236: Aparent bug in ecpg

Lists: pgsql-bugs
From: "Marcelo Mas" <mmas(at)atg(dot)com(dot)uy>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5236: Aparent bug in ecpg
Date: 2009-12-08 21:21:58
Message-ID: 200912082121.nB8LLw4I037592@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5236
Logged by: Marcelo Mas
Email address: mmas(at)atg(dot)com(dot)uy
PostgreSQL version: 8.4.1
Operating system: Suse 10
Description: Aparent bug in ecpg
Details:

At the company I work we developed a database adapter in C using ECPG for
postgresql 8.1.2 but when used with postgresql 8.4 we had the following
problem:

The program needs to prepare sentences in function A with name using:
EXEC SQL PREPARE :sentencename from :sentencecontent ;

Later it uses another function B in witch it is the following code :
EXEC SQL EXECUTE :sentencename using :values_struct:values_indicators ;

where the content of :sentencename is the same in both cases.

In run time, this sequence of execution works for 8.1.2 but not for 8.4.1
.

Second case does report errors like 'undefined sentence "name" ' and 'too
many parameters' .

If we modify the code to prepare and execute in same function (only for
testing ) it runs ok, but we do need to do it separately since one
preparation is for many executions.

If this report is not enougth clear you can mail me.

Thanks.