Re: BUG #6092: specific casting required for gist indexing of bigint - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6092: specific casting required for gist indexing of bigint
Date
Msg-id 2786.1309910771@sss.pgh.pa.us
Whole thread Raw
In response to BUG #6092: specific casting required for gist indexing of bigint  ("Jeff Frost" <jeff@pgexperts.com>)
Responses Re: BUG #6092: specific casting required for gist indexing of bigint
List pgsql-bugs
"Jeff Frost" <jeff@pgexperts.com> writes:
> Ran into a situation with a customer who is using the btree_gist contrib
> module to allow combined index of some tsearch data and two other columns.
> One of these other columns is a bigint field.  I noticed that the combined
> index won't be used by the planner unless you specifically cast the bare
> number to a bigint.

If memory serves, the btree_gist opclasses don't include any cross-type
operators, so "int8 = int4" doesn't work here.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Jeff Frost"
Date:
Subject: BUG #6092: specific casting required for gist indexing of bigint
Next
From: "giuseppe petazzoni"
Date:
Subject: BUG #6091: Information