Re: SERIAL or INT8 / Unique BLOB's - Mailing list pgsql-general

From Tom Lane
Subject Re: SERIAL or INT8 / Unique BLOB's
Date
Msg-id 8715.1010026453@sss.pgh.pa.us
Whole thread Raw
In response to Re: SERIAL or INT8 / Unique BLOB's  ("Jeffrey W. Baker" <jwbaker@acm.org>)
Responses Re: SERIAL or INT8 / Unique BLOB's  ("Jeffrey W. Baker" <jwbaker@acm.org>)
List pgsql-general
"Jeffrey W. Baker" <jwbaker@acm.org> writes:
> yabbut, has anyone seen yet if 7.2 can use bigint in an index (on a 32-bit
> machine)?

bigint index support has been there for quite awhile.  Possibly you
are missing the need to cast the constant to bigint:

    WHERE bigintcol = 42::bigint
or
    WHERE bigintcol = '42'
but not just
    WHERE bigintcol = 42
since int8-eq-int4 is not an indexable operator for an int8 index.

int2, float4, and numeric columns suffer from variants of this issue,
as do OID and some other types.

There have been various proposals to fix this class of annoyance,
but none have got past the assembled complainants yet ;-).  See the
pghackers archives, eg mid-May 2000, for past arguments.

            regards, tom lane

pgsql-general by date:

Previous
From: Dave Trombley
Date:
Subject: Re: SERIAL or INT8 / Unique BLOB's
Next
From: Bruce Momjian
Date:
Subject: Post-Great Bridge interview