Dave Cramer wrote:
> there is a well known issue with serial8. The index will not be used if
> you do select foo where serialvalue=1;
> you need to cast the 1 to int8
> ie select foo where serialvalue=1::int8 ( this is fixed in 8.0 )
This should also be fixed if you use the latest development driver,
connect to a 7.4 or later server, and use setLong() (or setObject with
Types.BIGINT) to set the parameter value. The V3 protocol Parse/Bind
messages that newer drivers generate will specify int8 for the parameter
type in this case, which is roughly equivalent to explicitly casting the
parameter to int8.
I haven't tested this, though -- it's theoretical :)
-O