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

Поиск
Список
Период
Сортировка
От Marines
Тема How to use constant or define inside the declare section in PostgreSQL's ecpg?
Дата
Msg-id 3c0306eb$1_2@binarykiller.newsgroups.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: Fwd: Re: ECPG error on inserting records to DB
Следующее
От: "J. 'FIK' Brand"
Дата:
Сообщение: ODBC driver with dynamic cursor support ??