Обсуждение: How to use constant or define inside the declare section in PostgreSQL's ecpg?

Поиск
Список
Период
Сортировка

How to use constant or define inside the declare section in PostgreSQL's ecpg?

От
"Marines"
Дата:
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!  ==-----