Re: JBoss w/int8 primary keys in postgres ...

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: JBoss w/int8 primary keys in postgres ...
Дата
Msg-id 1063114720.67981.9.camel@jester
обсуждение исходный текст
Ответ на Re: JBoss w/int8 primary keys in postgres ...  (Paul Thomas <paul@tmsl.demon.co.uk>)
Ответы Re: JBoss w/int8 primary keys in postgres ...
Список pgsql-jdbc
> With the proposed modifications to the JDBC driver enabled
>
> PreparedStatement pstmt = con.prepareStatement("select name from test
> where id = ?");
> pstmt.setLong(1, 42);
> pstmt.executeQuery();
>
> would actually produce:
>
> select name from test where id = 42::int8

Silly question, but why don't you simply ensure any ?'s are quoted?

select name from test where id = '42'

This allows PostgreSQL to choose the best type for the job -- in this
case it will try to match that of id.  It will work that way on all
older and newer versions of PostgreSQL.

Вложения

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

Предыдущее
От: Paul Thomas
Дата:
Сообщение: Re: JBoss w/int8 primary keys in postgres ...
Следующее
От: João Ribeiro
Дата:
Сообщение: Re: JBoss w/int8 primary keys in postgres ...