Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 6EC3BB5D91F for ; Thu, 16 Jun 2011 17:27:16 -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 37414-01 for ; Thu, 16 Jun 2011 20:27:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og101.obsmtp.com (exprod7og101.obsmtp.com [64.18.2.155]) by mail.postgresql.org (Postfix) with ESMTP id BED65B5D801 for ; Thu, 16 Jun 2011 17:27:08 -0300 (ADT) Received: from mail-ew0-f50.google.com ([209.85.215.50]) (using TLSv1) by exprod7ob101.postini.com ([64.18.6.12]) with SMTP ID DSNKTfpnGoTNFEGafp6LcbgL17jQuqLcnLBT@postini.com; Thu, 16 Jun 2011 13:27:09 PDT Received: by ewy10 with SMTP id 10so229963ewy.9 for ; Thu, 16 Jun 2011 13:27:05 -0700 (PDT) Received: by 10.213.26.138 with SMTP id e10mr555521ebc.126.1308256023682; Thu, 16 Jun 2011 13:27:03 -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 f48sm738783eeb.11.2011.06.16.13.27.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2011 13:27:02 -0700 (PDT) Message-ID: <4DFA6714.2070609@enterprisedb.com> Date: Thu, 16 Jun 2011 23:27:00 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.17) Gecko/20110510 Icedove/3.1.10 MIME-Version: 1.0 To: Pavel Stehule CC: Tom Lane , PostgreSQL-development Subject: Re: Nested CASE-WHEN scoping References: <4DDCEEB8.50602@enterprisedb.com> <5487.1306334876@sss.pgh.pa.us> <4DDD35B6.2050203@enterprisedb.com> <27772.1306359110@sss.pgh.pa.us> <4DE38CCD.80702@enterprisedb.com> <23055.1306765290@sss.pgh.pa.us> <4DE512FC.9070707@enterprisedb.com> <4DE93A08.90309@enterprisedb.com> In-Reply-To: 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: 201106/1448 X-Sequence-Number: 190161 On 16.06.2011 22:46, Pavel Stehule wrote: > I have a query - should be ExpressionParam used for removing a > multiple function call when composite result is expanded? > > With some similar optimization a SELECT (fce(x)).* FROM tab will be optimal Hmm, I don't think it will work as is for that purpose, as each targetlist item is a separate expression, and ExpressionParams only work within an expression. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com