Re: ECPG include problem - Mailing list pgsql-interfaces

From Michael Meskes
Subject Re: ECPG include problem
Date
Msg-id 20030221071429.GG7378@feivel.fam-meskes.de
Whole thread Raw
In response to ECPG include problem  (Mike Alford <mikea@syscon-intl.com>)
List pgsql-interfaces
On Wed, Feb 19, 2003 at 05:24:45PM +0000, Mike Alford wrote:
> everything is fine. Apparently the preprocessing that Ingres did is not
> happening in Postgres. There are over 2000 lines in db2.h, mostly with
> constants defined in db1.h. Is there something simple I am overlooking, or
> an option to epcg that could allow db2.h to be preprocessed before it is
> included?

Ingres preprocessor does parse C and CPP code as well, ecpg does not. It
only parses stuff after an exec sql keyword is found. The only way for
you get this going is to use "exec sql define" instead of "#define" as
the former is parsed an honored by ecpg. Of course you could as well try
running cpp over the files before but that won't always work.

Michael
-- 
Michael Meskes
Email: Michael@Fam-Meskes.De
ICQ: 179140304
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


pgsql-interfaces by date:

Previous
From: Matthew Vanecek
Date:
Subject: Re: structured host variable arrays within ecpg
Next
From: "Demetres Pantermalis"
Date:
Subject: Re: ECPG and C++ compilation