ECPG: How to use #define and string host variable - Mailing list pgsql-interfaces

From reply2nelson@yahoo.com (Nelson)
Subject ECPG: How to use #define and string host variable
Date
Msg-id 87d854b8.0201021022.681de39c@posting.google.com
Whole thread Raw
Responses Re: ECPG: How to use #define and string host variable  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
I want to declare a character string's
length as a #define and below gives me:

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?

Thanks.


pgsql-interfaces by date:

Previous
From: Björn Lundin
Date:
Subject: Ada interface (tihick)
Next
From: Jakob Lund
Date:
Subject: PQfinish also kills my dll