Default Cast type

Started by Markus Schulzabout 19 years ago2 messagesgeneral
Jump to latest
#1Markus Schulz
msc@antzsystem.de

Hello,
how can i choose a default data type for casts?
PG 7.4 has some problems to use an existing index, if the datatype not
match.
For example i have a int8 primary id column and search for this column,
i can't use the index for queries like:
SELECT ... WHERE id = 12345
if i'm use:
SELECT ... WHERE id = 12345::int8
it will use the index.

Is there a solution for PG 7.4 to choose the default datatype for this
way of casting?

--
Markus Schulz

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Markus Schulz (#1)
Re: Default Cast type

Markus Schulz <msc@antzsystem.de> writes:

Is there a solution for PG 7.4 to choose the default datatype for this
way of casting?

Yeah, it's called "update to 8.x" ...

regards, tom lane