Re: Advice
| От | Oliver Jowett |
|---|---|
| Тема | Re: Advice |
| Дата | |
| Msg-id | 412215E8.5040702@opencloud.com обсуждение исходный текст |
| Ответ на | Re: Advice (Dave Cramer <pg@fastcrypt.com>) |
| Список | 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
В списке pgsql-jdbc по дате отправления: