Re: Using bigint needs explicit cast to use the index - Mailing list pgsql-performance

From Neil Conway
Subject Re: Using bigint needs explicit cast to use the index
Date
Msg-id 404C9DE0.7000200@samurai.com
Whole thread Raw
In response to Re: Using bigint needs explicit cast to use the index  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: Using bigint needs explicit cast to use the index
List 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

pgsql-performance by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Using bigint needs explicit cast to use the index
Next
From: Bruno Wolff III
Date:
Subject: Re: Using bigint needs explicit cast to use the index