Re: Using bigint needs explicit cast to use the index

From: Neil Conway <neilc(at)samurai(dot)com>
To: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Using bigint needs explicit cast to use the index
Date: 2004-03-08 16:22:56
Message-ID: 404C9DE0.7000200@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Andrew Sullivan wrote:
> "Intended", no. "Expected", yes. This topic has had the best
> Postgres minds work on it, and so far nobody's come up with a
> solution.

Actually, this has already been fixed in CVS HEAD (as I mentioned in
this thread yesterday). To wit:

nconway=# create table t1 (a int8);
CREATE TABLE
nconway=# create index t1_a_idx on t1 (a);
CREATE INDEX
nconway=# explain select * from t1 where a = 5;
QUERY PLAN
--------------------------------------------------------------------
Index Scan using t1_a_idx on t1 (cost=0.00..17.07 rows=5 width=8)
Index Cond: (a = 5)
(2 rows)
nconway=# select version();
version
------------------------------------------------------------------------------------
PostgreSQL 7.5devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.3.3 (Debian)
(1 row)

-Neil

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2004-03-08 16:33:20 Re: Using bigint needs explicit cast to use the index
Previous Message Andrew Sullivan 2004-03-08 16:05:25 Re: Using bigint needs explicit cast to use the index