Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 69EEBB5DC2A for ; Wed, 25 May 2011 12:51:47 -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 84662-04-3 for ; Wed, 25 May 2011 15:51:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 4E3B1B5DF5F for ; Wed, 25 May 2011 12:11:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4PEluj6005488; Wed, 25 May 2011 10:47:57 -0400 (EDT) To: Heikki Linnakangas cc: PostgreSQL-development Subject: Re: Nested CASE-WHEN scoping In-reply-to: <4DDCEEB8.50602@enterprisedb.com> References: <4DDCEEB8.50602@enterprisedb.com> Comments: In-reply-to Heikki Linnakangas message dated "Wed, 25 May 2011 14:57:44 +0300" Date: Wed, 25 May 2011 10:47:56 -0400 Message-ID: <5487.1306334876@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/1265 X-Sequence-Number: 188299 Heikki Linnakangas writes: > While looking at fixing the multiple-evaluation issue in IN and BETWEEN > discussed a while ago, I realized that the current assumption that only > one CaseTestExpr placeholder needs to be valid at any given time is not > true. [ scratches head ... ] Why does the save/restore in ExecEvalCase not take care of this? > So I'm going to put the BETWEEN/IN fix aside for now, and refactor the > placeholder infrastructure to handle several simultaneous placeholders, That sounds like a mess, and I'm not even convinced it'll solve the problem ... regards, tom lane