Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION - Mailing list pgsql-bugs

From Michael Meskes
Subject Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION
Date
Msg-id 20131125141446.GA11608@feivel.credativ.lan
Whole thread Raw
In response to Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION  (Boszormenyi Zoltan <zb@cybertec.at>)
List 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
alreadyexists. 

> 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

pgsql-bugs by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION
Next
From: Tom Lane
Date:
Subject: Re: BUG #8611: ECPG: unclosed comment "/*"