Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkrNZ-000679-RS for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Nov 2013 08:18:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VkrNZ-0006Hz-6C for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Nov 2013 08:18:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkrNY-0006Hs-6f for pgsql-bugs@postgresql.org; Mon, 25 Nov 2013 08:18:48 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkrNQ-0000s9-VE; Mon, 25 Nov 2013 08:18:47 +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 D85591B6088; Mon, 25 Nov 2013 09:18:38 +0100 (CET) Received: by feivel (Postfix, from userid 1000) id 99AB49F114; Mon, 25 Nov 2013 09:18:38 +0100 (CET) Date: Mon, 25 Nov 2013 09:18:38 +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: <20131125081838.GA16770@feivel.credativ.lan> References: <20131124115517.GA1658@feivel.credativ.lan> <5292145C.5000508@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5292145C.5000508@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 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 > > #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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs