Re: FW: PreparedStatement#setString on non-string parameters

Поиск
Список
Период
Сортировка
От Antony Paul
Тема Re: FW: PreparedStatement#setString on non-string parameters
Дата
Msg-id 2989532e05030819582e7c8d0a@mail.gmail.com
обсуждение исходный текст
Ответ на Re: FW: PreparedStatement#setString on non-string parameters  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: FW: PreparedStatement#setString on non-string parameters  ("Silvio Bierman" <sbierman@jambo-software.com>)
Список pgsql-jdbc
Does this new stuff added in 8.0 driver adds to performance ?. I had
this setString() problem and I tested 7.4.x driver which works and
performs better than 8.0 driver.



On Wed, 09 Mar 2005 10:47:34 +1300, Oliver Jowett <oliver@opencloud.com> wrote:
> Silvio Bierman wrote:
>
> > Either the JDBC drivers for the databases I mentioned earlier do the
> > conversion or the database backends do it on the server side. Any way, this
> > works in all cases. PostgreSQL is the first database to break our
> > application due to this behaviour. We have had problems on earlier versions
> > of MySQL because of lack of subselect support etc. but never these issues.
>
> I'd suggest using CAST in your SQL -- that in theory should work
> everywhere and reflects your application's intent (to interpret a string
> as a numeric value).
>
> The problem with reverting to the old way of doing parameters (direct
> text substitution into the query) is that we cannot take advantage of
> most of the new stuff in the V3 protocol -- that means no server-side
> prepared statement reuse, no low-overhead transfer of large parameters,
> and reduced support for cursor-based resultsets.
>
> -O
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>


--
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: FW: PreparedStatement#setString on non-string parameters
Следующее
От: "Silvio Bierman"
Дата:
Сообщение: Re: FW: PreparedStatement#setString on non-string parameters