X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 150F2D1E3D5 for ; Mon, 19 Jan 2004 18:32:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 04349-09 for ; Mon, 19 Jan 2004 14:31:40 -0400 (AST) Received: from happy.onesystem.ca (happy.onesystem.ca [205.206.61.17]) by svr1.postgresql.org (Postfix) with ESMTP id 1DCE9D1E3D4 for ; Mon, 19 Jan 2004 14:31:36 -0400 (AST) Received: from elb_lx.onesystem.ca ([10.1.1.50]) by happy.onesystem.ca with asmtp (Exim 4.14) id 1AieBU-0004jT-Ha for pgsql-interfaces@postgresql.org; Mon, 19 Jan 2004 11:31:36 -0700 Subject: ECPG and typedef struct From: Edmund Bacon To: pgsql-interfaces@postgresql.org Content-Type: text/plain Message-Id: <1074537096.4164.117.camel@elb_lx.onesystem.ca> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 19 Jan 2004 11:31:36 -0700 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/12 X-Sequence-Number: 4681 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