Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, alexsav23(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION
Date: 2013-11-25 14:14:46
Message-ID: 20131125141446.GA11608@feivel.credativ.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-11-25 14:34:00 Re: BUG #8611: ECPG: unclosed comment "/*"
Previous Message Boszormenyi Zoltan 2013-11-25 13:19:13 Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION