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

Re: ecpg -D SYMBOL

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Luke McFarlane <luke(at)fisheye(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: ecpg -D SYMBOL
Date: 2004-07-20 18:23:12
Message-ID: 20040720182312.GA4726@1 (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, Jul 06, 2004 at 03:49:14PM +1000, Luke McFarlane wrote:
> 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.

This indeed is a bug, but ecpg has never been designed to limit symbols
to SQL space. You're absolutely right that it should not use empty
space. I just fixed that in CVS. Now it correctly uses "1".

> It shouldn't touch anything outside EXEC SQL.

Why? That means you have to define most things twice.

> 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.

Ah yes, another bug. 

I just committed a fix for this as well.

All fixes went into HEAD and 7.4.

Michael

-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

In response to

Responses

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2004-07-20 19:51:58
Subject: Re: SELECT DISTINCT on boxes
Previous:From: Josh BerkusDate: 2004-07-20 18:06:27
Subject: Re: Bug in concat operator for Char? -- More Info

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