ECPG and typedef struct - Mailing list pgsql-interfaces

From Edmund Bacon
Subject ECPG and typedef struct
Date
Msg-id 1074537096.4164.117.camel@elb_lx.onesystem.ca
Whole thread Raw
Responses Re: ECPG and typedef struct  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
Is it still necessary to define SQL TYPEs twice?

eg

typedef struct foo { ... } foo_t;

EXEC SQL TYPE foo_t IS struct foo { ... };

Is there some less maintenance-error-prone way to accomplish this?  I
know about the -c option to ecpg, but this doesn't help if I need to
access the defined type from a .c file.

Ideally the C level typedef would be in a .h file somewhere and either
#include-ed or EXEC SQL INCLUDE-ed into .c or .pgc file

Thanks

-- 
Edmund Bacon <ebacon@onesystem.com>



pgsql-interfaces by date:

Previous
From: L J Bayuk
Date:
Subject: Re: PQsetNoticeReceiver issues
Next
From: Christof Petig
Date:
Subject: Re: ECPG and EXEC SQL GET DIAGNOSTICS