X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 020FAD1B4E2 for ; Mon, 22 Sep 2003 06:34:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 63920-02 for ; Mon, 22 Sep 2003 03:33:51 -0300 (ADT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189]) by svr1.postgresql.org (Postfix) with ESMTP id 208A2D1B57F for ; Mon, 22 Sep 2003 03:33:50 -0300 (ADT) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1A1KGc-0000Ja-00 for pgsql-interfaces@postgresql.org; Mon, 22 Sep 2003 08:33:50 +0200 Received: from [80.142.171.101] (helo=fam-meskes.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1A1KGc-0004c8-00; Mon, 22 Sep 2003 08:33:50 +0200 Received: from feivel.fam-meskes.de (feivel.fam-meskes.de [172.26.14.7]) by fam-meskes.de (Postfix) with ESMTP id 659FC10F2C8; Mon, 22 Sep 2003 08:33:46 +0200 (CEST) Received: by feivel.fam-meskes.de (Postfix, from userid 1000) id 4A5A385D80; Mon, 22 Sep 2003 08:33:46 +0200 (CEST) Date: Mon, 22 Sep 2003 08:33:46 +0200 From: Michael Meskes To: =?utf-8?Q?J=C3=BCrgen?= Cappel Cc: pgsql-interfaces@postgresql.org Subject: Re: ECPG and structure declaration Message-ID: <20030922063346.GA3480@feivel.fam-meskes.de> Mail-Followup-To: =?utf-8?Q?J=C3=BCrgen?= Cappel , pgsql-interfaces@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/57 X-Sequence-Number: 4475 On Sun, Sep 21, 2003 at 08:46:02AM +0200, Jürgen Cappel wrote: > why is the following code fragment an error for ecpg ? > > --------------------------------------------- > EXEC SQL BEGIN DECLARE SECTION; > struct base > { > char basekey [ 26 ]; > }; > EXEC SQL END DECLARE SECTION; Because the struct is not used to define a variable. The next release will be able to correctly parse this kind of definition itself, but until then you have to list the whole struct definition when defining the variable. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!