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 20131125081838.GA16770@feivel.credativ.lan
Whole thread Raw
In response to Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION  (Boszormenyi Zoltan <zb@cybertec.at>)
List pgsql-bugs
On Sun, Nov 24, 2013 at 03:59:40PM +0100, Boszormenyi Zoltan wrote:
> I think it's needlessly narrows the scope of the problem.
> Consider this code:
>
> #include <stdio.h>
>
> #define hide_size_of_var sizeof
> ...

I assume you'd want to put this defined name into a declare section, right?
Well, that's what EXEC SQL DECLARE is for, isn't it?

> I think you should pass everything through as is inside the '[' and ']' and
> let the C compiler fail if the code is not valid.

I prefer catching as much as possible without re-implementing a C-compiler of course.

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: Ronan Dunklau
Date:
Subject: Re: Server may segfault when using slices on int2vector
Next
From: Michael Meskes
Date:
Subject: Re: BUG #8611: ECPG: unclosed comment "/*"