Re: bigint and indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bill Schneider" <bschneider(at)vecna(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: bigint and indexes
Date: 2002-10-04 18:09:10
Message-ID: 25221.1033754950@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Bill Schneider" <bschneider(at)vecna(dot)com> writes:
> This seems to be a well-known and documented issue. Are there already plans
> to fix this in an upcoming release?

Yes.

> Is the problem here in the optimizer itself, or in the parser?

The problem is that the query is interpreted as "int8col int84eq int4const"
and int84eq is not one of the operators in the index's opclass. The
planned fix is to get rid of int84eq (and most other cross-datatype
operators) so that the parser is forced to select plain int8eq and
up-convert the literal to int8.

See past discussions of numeric coercion rules in pgsql-hackers archives
if you want to know more about why this is a difficult issue.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-10-04 18:17:53 Re: Bug in Function-Transactions?
Previous Message Tom Lane 2002-10-04 17:54:30 Re: 7.3B2 initdb fails