Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id CDFEDB5DBC1 for ; Sat, 2 Jul 2011 22:21:29 -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 06412-02 for ; Sun, 3 Jul 2011 01:21:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by mail.postgresql.org (Postfix) with ESMTP id 8A512B5D80A for ; Sat, 2 Jul 2011 22:21:23 -0300 (ADT) Received: by pzk9 with SMTP id 9so789293pzk.19 for ; Sat, 02 Jul 2011 18:21:23 -0700 (PDT) Received: by 10.68.4.228 with SMTP id n4mr5637432pbn.518.1309656082977; Sat, 02 Jul 2011 18:21:22 -0700 (PDT) Received: from [192.168.1.101] (c-69-181-249-16.hsd1.ca.comcast.net [69.181.249.16]) by mx.google.com with ESMTPS id x1sm2942653pbb.82.2011.07.02.18.21.18 (version=SSLv3 cipher=OTHER); Sat, 02 Jul 2011 18:21:19 -0700 (PDT) Subject: Re: Re: PG regression with row comparison when btree_gist is enabled (BUG) From: Jeff Davis To: Tom Lane Cc: oleg@sai.msu.su, Denis de Bernardy , Teodor Sigaev , pgsql-bugs@postgresql.org In-Reply-To: <21086.1309646333@sss.pgh.pa.us> 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> Content-Type: text/plain; charset="UTF-8" Date: Sat, 02 Jul 2011 18:21:22 -0700 Message-ID: <1309656082.3012.13.camel@jdavis> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 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: 201107/11 X-Sequence-Number: 30623 On Sat, 2011-07-02 at 18:38 -0400, Tom Lane wrote: > Quite honestly, I think that the bug is that btree_gist took it upon > itself to invent <> as an indexable operator. Well, it was following documentation that any extension could potentially use. I think it's a stretch to call it a bug in anything other than postgres. So I think we'd need to introduce extra documentation to say that at most one of an operator and its negator can be indexable; and we should add a check to prevent that as well. > The odds that that will > ever be of practical use seem negligible, and not at all adequate to > warrant adding extra cycles into mainstream code paths. It's not too > late to rip that out of 9.1, and that's what I think we should do. Fair enough. I think it was kind of an interesting use case, and there might be others like it; but I agree that it wasn't particularly compelling. The alternatives don't seem very attractive. To get it to work with one lookup we'd have to either clutter the btree opclasses with "<>", or invent a new syscache that has the AM as a key so we can filter out non-btree opclasses. I suppose this is another argument for type interfaces. Regards, Jeff Davis