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 08:18:38
Message-ID: 20131125081838.GA16770@feivel.credativ.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Meskes 2013-11-25 08:36:44 Re: BUG #8611: ECPG: unclosed comment "/*"
Previous Message Ronan Dunklau 2013-11-25 06:56:21 Re: Server may segfault when using slices on int2vector