Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkwwD-0002wi-8K for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Nov 2013 14:14:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VkwwC-0007tD-OP for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Nov 2013 14:14:56 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkwwC-0007t7-2I for pgsql-bugs@postgresql.org; Mon, 25 Nov 2013 14:14:56 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vkww5-0002Ev-Eb; Mon, 25 Nov 2013 14:14:55 +0000 Received: from feivel (wan3.credativ.com [94.79.138.166]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mme@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 244AC1B6088; Mon, 25 Nov 2013 15:14:47 +0100 (CET) Received: by feivel (Postfix, from userid 1000) id D7BBE9F114; Mon, 25 Nov 2013 15:14:46 +0100 (CET) Date: Mon, 25 Nov 2013 15:14:46 +0100 From: Michael Meskes To: Boszormenyi Zoltan Cc: Michael Meskes , alexsav23@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION Message-ID: <20131125141446.GA11608@feivel.credativ.lan> References: <20131124115517.GA1658@feivel.credativ.lan> <5292145C.5000508@cybertec.at> <20131125081838.GA16770@feivel.credativ.lan> <52934E51.8030000@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52934E51.8030000@cybertec.at> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Mon, Nov 25, 2013 at 02:19:13PM +0100, Boszormenyi Zoltan wrote: > Of course. And of course you meant EXEC SQL DEFINE. Yes. :) > The attached code throws syntax errors over sizeof(int) and > sizeof(struct somestruct). I compiled GIT HEAD which contains your fix: Thanks for spotting this. Using ColId as type name was pretty stupid of me, in particular when a non-terminal var_type already exists. > The attached patch fixes "sizeof(struct something)" but the > "simple_type" variant that should also accept > [signed|unsigned]{char|short|int|long|long long} > causes 2 shift/reduce problems when processing preproc.y. That's because with the additional rules we add CHAR and DOUBLE twice. Should be fixed now. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at gmail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs