How to use constant or define inside the declare section in PostgreSQL's ecpg? - Mailing list pgsql-interfaces

From Marines
Subject How to use constant or define inside the declare section in PostgreSQL's ecpg?
Date
Msg-id 3c0306eb$1_2@binarykiller.newsgroups.com
Whole thread Raw
List pgsql-interfaces
I want to use a constant inside my declare section but ecpg won't allow it.
Is there a workaround? thanks....

foo.pgc
--------------------
#define SIZE 10
EXEC SQL BEGIN DECLARE SECTION;
int foo[SIZE];
EXEC SQL END DECLARE SECTION;

> ecpg foo.pgc
ERROR: parse error, expecting `CVARIABLE' or `ICONST' or `']'' or `'('' at
or near "SIZE"
"dtv.pc", line 42: Error: "}" expected instead of EOF.
1 Error(s) detected.




-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!Check out our new Unlimited Server. No Download or
TimeLimits!
 
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----




-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!Check out our new Unlimited Server. No Download or
TimeLimits!
 
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----


pgsql-interfaces by date:

Previous
From: Michael Meskes
Date:
Subject: Re: Fwd: Re: ECPG error on inserting records to DB
Next
From: "J. 'FIK' Brand"
Date:
Subject: ODBC driver with dynamic cursor support ??