Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3E5BFB5DBEF for ; Wed, 6 Jul 2011 15:59:54 -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 71566-02 for ; Wed, 6 Jul 2011 18:59:48 +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 D199BB5DBE8 for ; Wed, 6 Jul 2011 15:59:47 -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 p66IxlRV024700; Wed, 6 Jul 2011 14:59:47 -0400 (EDT) To: Jeff Davis cc: oleg@sai.msu.su, Denis de Bernardy , Teodor Sigaev , pgsql-bugs@postgresql.org Subject: Re: Re: PG regression with row comparison when btree_gist is enabled (BUG) In-reply-to: <1309975571.3012.141.camel@jdavis> References: <4DF81BA0.3000601@archidevsys.co.nz> <743036.48052.qm@web112401.mail.gq1.yahoo.com> <366790.65150.qm@web112414.mail.gq1.yahoo.com> <1308428403.2597.66.camel@jdavis> <1308504190.2597.71.camel@jdavis> <21086.1309646333@sss.pgh.pa.us> <1309886656.3012.83.camel@jdavis> <21432.1309888581@sss.pgh.pa.us> <1309971611.3012.121.camel@jdavis> <13404.1309973153@sss.pgh.pa.us> <1309975571.3012.141.camel@jdavis> Comments: In-reply-to Jeff Davis message dated "Wed, 06 Jul 2011 11:06:11 -0700" Date: Wed, 06 Jul 2011 14:59:47 -0400 Message-ID: <24699.1309978787@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: 201107/51 X-Sequence-Number: 30663 Jeff Davis writes: > On Wed, 2011-07-06 at 13:25 -0400, Tom Lane wrote: >> Actually, I'd just been working on this myself. I think the cleanest >> solution will be to get rid of the duplicative logic by making >> predtest.c use get_op_btree_interpretation(). That will require >> changing get_op_btree_interpretation() so it can return amoplefttype >> and amoprighttype too, but given the small number of callers, an API >> change for it doesn't seem like a problem. > Sounds good to me. Committed that way. Just for the archives' sake, the test case I was using for the planner side of things was create index tenk1p on tenk1 (twothousand) where twothousand <> 42; explain select * from tenk1 where twothousand < 40; which should use the partial index, but it was failing to prove the implication when btree_gist was installed. regards, tom lane