ecpg -D SYMBOL - Mailing list pgsql-bugs

From Luke McFarlane
Subject ecpg -D SYMBOL
Date
Msg-id 40EA3D5A.1010400@fisheye.com.au
Whole thread Raw
Responses Re: ecpg -D SYMBOL
List pgsql-bugs
Hi

I'm running postgresql 7.4.1 and ecpg 3.1.0.

When defining a symbol on the command line with ecpg -D SYMBOL the ecpg
preprocessor will replace that symbol with empty space in 'C' program
space rather than limiting it to 'SQL' program space.

For example:

EXEC SQL IFDEF SYMBOL;
EXEC SQL ...
EXEC SQL ENDIF;

#ifdef SYMBOL
...
#endif

compiling with ecpg -D SYMBOL results in

EXEC SQL IFDEF SYMBOL;
EXEC SQL ...
EXEC SQL ENDIF;

#ifdef
...
#endif

It shouldn't touch anything outside EXEC SQL.

Also, if you try to fool ecpg by compiling with ecpg -D SYMBOL=SYMBOL it
will sit in an infinite loop gobbling as much virtual memory as it sees fit.

Luke

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #1118: Misleading Commit message
Next
From: Luis Sousa
Date:
Subject: Bug related with permissions - VIEWS and RULES