Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 18F51B5DBDE for ; Wed, 6 Jul 2011 14:28:20 -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 95732-09 for ; Wed, 6 Jul 2011 17:28:14 +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 CEA90B5DBDA for ; Wed, 6 Jul 2011 14:28:13 -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 p66HPtIg013444; Wed, 6 Jul 2011 13:25:55 -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: <1309971611.3012.121.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> Comments: In-reply-to Jeff Davis message dated "Wed, 06 Jul 2011 10:00:11 -0700" Date: Wed, 06 Jul 2011 13:25:53 -0400 Message-ID: <13404.1309973153@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/49 X-Sequence-Number: 30661 Jeff Davis writes: > On Tue, 2011-07-05 at 13:56 -0400, Tom Lane wrote: >> Yeah, I had been thinking along the same lines. It will require >> duplicating the search loop, which is a bit annoying, but perhaps that >> could be factored out as a subroutine. > Patch attached. The logic in predtest.c was a little more complex, and I > don't think we have a lot of test coverage in this area (and I didn't > see an easy way to add many tests), so this will need some review. 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. regards, tom lane