Unix Technical Forum

BUG #2146: ECPG, cursros and conditional compilations...

This is a discussion on BUG #2146: ECPG, cursros and conditional compilations... within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2146 Logged by: Chuck Wegrzyn Email address: cew@garbagedump.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:37 AM
Chuck Wegrzyn
 
Posts: n/a
Default BUG #2146: ECPG, cursros and conditional compilations...


The following bug has been logged online:

Bug reference: 2146
Logged by: Chuck Wegrzyn
Email address: cew@garbagedump.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.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com