On Wed, Jan 02, 2002 at 10:22:59AM -0800, Nelson wrote:
> ERROR: parse error, expecting `CVARIABLE' or `ICONST' or `']'' or `'('
> ' at or near "MAX"
>
> #define MAX 10
>
> EXEC SQL BEGIN DECLARE SECTION;
> char t[MAX];
> EXEC SQL END DECLARE SECTION;
>
> How do I make the precompiler see the define?
Just use
EXEC SQL DEFINE MAX 10;
EXEC SQL BEGIN DECLARE SECTION;
char t[MAX];
EXEC SQL END DECLARE SECTION;
ECPG only parses statements beginning with EXEC SQL.
Michael
--
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!