Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 05D901337999 for ; Tue, 2 Nov 2010 14:51:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 50720-10; Tue, 2 Nov 2010 17:51:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og117.obsmtp.com (exprod7og117.obsmtp.com [64.18.2.6]) by mail.postgresql.org (Postfix) with SMTP id 25B34133798F; Tue, 2 Nov 2010 14:51:33 -0300 (ADT) Received: from source ([209.85.213.178]) by exprod7ob117.postini.com ([64.18.6.12]) with SMTP ID DSNKTNBPpTYQlTR5pDzsz3wt+1Yf+sFoe8v2@postini.com; Tue, 02 Nov 2010 10:51:34 PDT Received: by yxd39 with SMTP id 39so4528054yxd.9 for ; Tue, 02 Nov 2010 10:51:32 -0700 (PDT) Received: by 10.42.209.70 with SMTP id gf6mr2119283icb.520.1288720292847; Tue, 02 Nov 2010 10:51:32 -0700 (PDT) Received: from [192.168.2.36] (va-76-4-65-131.sta.embarqhsd.net [76.4.65.131]) by mx.google.com with ESMTPS id y21sm3869454vbx.6.2010.11.02.10.51.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Nov 2010 10:51:31 -0700 (PDT) Cc: Heikki Linnakangas , Zoltan Boszormenyi , PostgreSQL Bugs Message-Id: <2EE12379-4A35-40A8-977B-0CC43B8A7FEB@enterprisedb.com> From: Korry Douglas To: Michael Meskes In-Reply-To: <20101102173913.GA32303@hyperion.credativ.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: ecpg preprocessor regression in 9.0 Date: Tue, 2 Nov 2010 13:51:29 -0400 References: <4CCEC145.3020409@enterprisedb.com> <4CCEC4D8.2090809@enterprisedb.com> <20101102173913.GA32303@hyperion.credativ.de> X-Mailer: Apple Mail (2.936) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201011/18 X-Sequence-Number: 28598 >> On closer look, it's quite obvious: the code added to >> ECPGdump_a_type thinks that ECPGt_const is a variable type, and >> tries to look up the variable. The straightforward fix is this: >> ... >> But I wonder if there is a better way to identify variable-kind of >> ECPGttypes than list the ones that are not. There's some special >> ECPGttypes still missing from the above if-test, like >> ECPGt_NO_INDICATOR, but I'm not sure if they can ever be passed to >> ECPGdump_a_type. Seems a bit fragile anyway. > > I agree. How about adding a macro definition explicitely checking > for the real > variable types? Why not a function instead of a macro? You can set a breakpoint on a function if you need to debug. It seems unlikely that you would every see any measurable performance gain by writing a macro instead of a function. -- Korry