Skip site navigation (1) Skip section navigation (2)

ecpg -D SYMBOL

From: Luke McFarlane <luke(at)fisheye(dot)com(dot)au>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ecpg -D SYMBOL
Date: 2004-07-06 05:49:14
Message-ID: 40EA3D5A.1010400@fisheye.com.au (view raw or flat)
Thread:
Lists: 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


Responses

pgsql-bugs by date

Next:From: Luis SousaDate: 2004-07-06 08:33:17
Subject: Bug related with permissions - VIEWS and RULES
Previous:From: Gaetano MendolaDate: 2004-07-05 23:20:20
Subject: Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group