Re: Re: PG regression with row comparison when btree_gist is enabled (BUG) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Re: PG regression with row comparison when btree_gist is enabled (BUG)
Date
Msg-id 21432.1309888581@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: PG regression with row comparison when btree_gist is enabled (BUG)  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Re: PG regression with row comparison when btree_gist is enabled (BUG)  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-bugs
Jeff Davis <pgsql@j-davis.com> writes:
> I think that ripping out the change to btree_gist is also insufficient;
> we would also have to prevent other extensions from doing the same. That
> means documenting an odd special case, and testing for it when defining
> an opclass. And then we'd probably have to backpatch this kludge.

There is that.  I doubt it's worth back-patching, though.

> Something simpler seems possible here. The root of the problem is that
> we're being fooled by GiST opclasses when all we care about are BTree
> opclasses anyway. A simple fix would be to introduce a flag
> "found_btree_op". If we hit any BTree entries from pg_amop at all, then
> we're done after the loop is done. If not, then we negate the op and
> loop again.

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.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Re: PG regression with row comparison when btree_gist is enabled (BUG)
Next
From: "Jeff Frost"
Date:
Subject: BUG #6092: specific casting required for gist indexing of bigint