Re: index not used for bigint without explicit cast - Mailing list pgsql-bugs

From Rod Taylor
Subject Re: index not used for bigint without explicit cast
Date
Msg-id 1054043810.93507.1.camel@jester
Whole thread Raw
In response to index not used for bigint without explicit cast  (Dave E Martin XXIII <postgresql-to.dave@dave.to>)
List pgsql-bugs
> explain analyze select * from connection_data where id=3D23457;

Quote the number or cast it to int8.

id=3D'23457' or id=3Dcast(23457 as int8)


PostgreSQL has a hard time with mixed datatypes and indexscans at the
moment.

--=20
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

pgsql-bugs by date:

Previous
From: Theodore Petrosky
Date:
Subject: Re: Question to You
Next
From: Tom Lane
Date:
Subject: Re: ERROR: Memory exhausted in AllocSetAlloc(68)