pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edmund Bacon <ebacon@onesystem.com>
To: pgsql-interfaces@postgresql.org
Subject: ECPG and typedef struct
Date: Mon, 19 Jan 2004 11:31:36 -0700
Message-ID: <1074537096.4164.117.camel@elb_lx.onesystem.ca> (raw)

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>




view thread (2+ messages)  latest in thread

Message-ID: <1074537096.4164.117.camel@elb_lx.onesystem.ca>
Permalink:  ../1074537096.4164.117.camel@elb_lx.onesystem.ca/
Also on:    postgresql.org/message-id/1074537096.4164.117.camel@elb_lx.onesystem.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: ebacon@onesystem.com
  Subject: Re: ECPG and typedef struct
  In-Reply-To: <1074537096.4164.117.camel@elb_lx.onesystem.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox