Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 9F10CC7DB11 for ; Mon, 19 Mar 2012 07:42:18 -0300 (ADT) Received: from v1.rz.uni-leipzig.de ([139.18.1.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S9a2Z-0005Jj-7x for pgsql-bugs@postgresql.org; Mon, 19 Mar 2012 10:42:17 +0000 Received: from localhost (localhost [127.0.0.1]) by v1.rz.uni-leipzig.de (Postfix) with ESMTP id 62485F8067 for ; Mon, 19 Mar 2012 11:42:01 +0100 (CET) X-Virus-Scanned: by amavisd-new at v1-ul Received: from v1.rz.uni-leipzig.de ([127.0.0.1]) by localhost (v1.rz.uni-leipzig.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id clmtswd4lC7r for ; Mon, 19 Mar 2012 11:42:01 +0100 (CET) Received: from isun.informatik.uni-leipzig.de (isun.informatik.uni-leipzig.de [139.18.13.50]) by v1.rz.uni-leipzig.de (Postfix) with ESMTP id 497E1F805A for ; Mon, 19 Mar 2012 11:42:01 +0100 (CET) Received: from smtp.informatik.uni-leipzig.de (smtp.informatik.uni-leipzig.de [139.18.13.51]) by isun.informatik.uni-leipzig.de (8.14.4+Sun/8.14.4) with ESMTP id q2JAfwv2008797 for ; Mon, 19 Mar 2012 11:41:58 +0100 (CET) Received: from [139.18.252.207] (wlan1231.rz.uni-leipzig.de [139.18.252.207]) (authenticated bits=0) by smtp.informatik.uni-leipzig.de (8.14.3/8.14.3) with ESMTP id q2JAg06k004714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 19 Mar 2012 11:42:01 +0100 (CET) Message-ID: <4F670D78.1030501@informatik.uni-leipzig.de> Date: Mon, 19 Mar 2012 11:42:00 +0100 From: Claus Stadler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions References: <4F516CC4.9020606@informatik.uni-leipzig.de> <390.1331918266@sss.pgh.pa.us> In-Reply-To: <390.1331918266@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201203/140 X-Sequence-Number: 32701 Cool, thank you very much. Cheers, Claus On 03/16/2012 06:17 PM, Tom Lane wrote: > Claus Stadler writes: >> Filtering a Union on constant custom type: >> ... >> Expected: Query optimizer should discard the scan as filter cannot be >> satisfied. > I've applied a patch for this. Thanks for the report! > > regards, tom lane >