Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2FC0AB5D80B for ; Sat, 8 Oct 2011 05:34:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 72146-04 for ; Sat, 8 Oct 2011 08:34:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from exprod7og116.obsmtp.com (exprod7og116.obsmtp.com [64.18.2.219]) by mail.postgresql.org (Postfix) with ESMTP id 1E75CB5D803 for ; Sat, 8 Oct 2011 05:34:29 -0300 (ADT) Received: from mail-bw0-f54.google.com ([209.85.214.54]) (using TLSv1) by exprod7ob116.postini.com ([64.18.6.12]) with SMTP; Sat, 08 Oct 2011 01:34:30 PDT Received: by bkbzs8 with SMTP id zs8so6920539bkb.13 for ; Sat, 08 Oct 2011 01:34:27 -0700 (PDT) Received: by 10.223.92.144 with SMTP id r16mr16716124fam.23.1318062865703; Sat, 08 Oct 2011 01:34:25 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi. [88.195.122.240]) by mx.google.com with ESMTPS id w14sm17327563fae.13.2011.10.08.01.34.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 08 Oct 2011 01:34:24 -0700 (PDT) Message-ID: <4E900B0E.8030109@enterprisedb.com> Date: Sat, 08 Oct 2011 11:34:22 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.21) Gecko/20110831 Icedove/3.1.13 MIME-Version: 1.0 To: Sergey CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6242: ERROR: unexpected CASE WHEN clause: 333 References: <201110070729.p977Tdcx075504@wwwmaster.postgresql.org> <4E8EB7C3.3090008@enterprisedb.com> In-Reply-To: <4E8EB7C3.3090008@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/64 X-Sequence-Number: 31334 On 07.10.2011 11:26, Heikki Linnakangas wrote: > I'm inclined to do a quick fix in transformAExprOp() function to not > apply the transformation if either side of the = operation is a > CaseTestExpr, per attached patch. We could potentially have the same > problem with any "a = NULL" expression created internally in the parser, > but I don't see any more instances of that, aside from this construction > of WHEN expressions. Committed that patch, thanks for the report! -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com