From: | "Chuck Wegrzyn" <cew(at)garbagedump(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2146: ECPG, cursros and conditional compilations... |
Date: | 2006-01-05 15:18:10 |
Message-ID: | 20060105151810.7C254F0AC7@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2146
Logged by: Chuck Wegrzyn
Email address: cew(at)garbagedump(dot)com
PostgreSQL version: 8.1.0
Operating system: Linux
Description: ECPG, cursros and conditional compilations...
Details:
I don't know if this is known or not, but it was a pretty interesting
"feature" to find.
I started out with a definition of a cursor:
EXEC SQL DECLARE StoreCur CURSOR FOR
SELECT schemaID, TenantName, Category, ModuleID,
Argument, EncryptID, RelSpeed
FROM Schema,Tenant WHERE Schema.TenantID =
Tenant.TenantID;
This worked fine. When I decided I wanted to have a different cursor but
keep the old in the source I did the normal C thing...
#if 0
<old DECLARE>
#else
<new DECLARE>
#endif
To those of you "old hands" you are probably saying: What an idiot that
won't work! How true. When I needed to do was:
// <old DECLARE>
<new DECLAR>
I find this rather inconsistent in the way ECPG works.
Even stranger was the error I got from ECPG...
ECPG -o store.c store.ec
store.ec:146: ERROR: cursor StoreCur already defined
store.ec:411: WARNING: cursor `StoreCur has been declared but ot opened
make: *** [store.c] Error 3
The warning message looks like garbage insterted after the StoreCur name.
Thanks, Peace and Happy New Year.
From | Date | Subject | |
---|---|---|---|
Next Message | Sokolov Yura | 2006-01-05 16:19:23 | BUG #2148: Crashes on simple statement |
Previous Message | mike | 2006-01-05 05:01:09 | Re: BUG #2145: FTP Mirror to download is not found |