Re: SERIAL or INT8 / Unique BLOB's

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org>
Cc: Dave Trombley <dtrom(at)bumba(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: SERIAL or INT8 / Unique BLOB's
Date: 2002-01-03 02:54:13
Message-ID: 8715.1010026453@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jeffrey W. Baker" <jwbaker(at)acm(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gould 2002-01-03 03:01:39 Re: copy from ???
Previous Message Jeff Davis 2002-01-03 01:37:30 Re: PostgreSQL GUI