Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 83E3919964F1 for ; Fri, 16 Mar 2012 14:18:03 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S8amv-0002Mi-2q for pgsql-bugs@postgresql.org; Fri, 16 Mar 2012 17:18:02 +0000 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 q2GHHkVM000391; Fri, 16 Mar 2012 13:17:46 -0400 (EDT) To: Claus Stadler cc: pgsql-bugs@postgresql.org Subject: Re: Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions In-reply-to: <4F516CC4.9020606@informatik.uni-leipzig.de> References: <4F516CC4.9020606@informatik.uni-leipzig.de> Comments: In-reply-to Claus Stadler message dated "Sat, 03 Mar 2012 01:58:44 +0100" Date: Fri, 16 Mar 2012 13:17:46 -0400 Message-ID: <390.1331918266@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/121 X-Sequence-Number: 32682 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