From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | pg(at)fastcrypt(dot)com |
Cc: | lane(at)opendoors(dot)com, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Advice |
Date: | 2004-08-17 14:27:52 |
Message-ID: | 412215E8.5040702@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Lane Sharman | 2004-08-17 15:50:35 | Re: Advice |
Previous Message | Dave Cramer | 2004-08-17 14:13:53 | Re: Advice |