Re: Invalid (null) int8, can't convert to float8

Поиск
Список
Период
Сортировка
От Tim Pizey
Тема Re: Invalid (null) int8, can't convert to float8
Дата
Msg-id 3AB6A70E.3B90236B@paneris.co.uk
обсуждение исходный текст
Ответ на Invalid (null) int8, can't convert to float8  (Tim Pizey <tim@paneris.co.uk>)
Список pgsql-sql
Thanks a lot Tom, 

Tom Lane wrote:
> 
> Tim Pizey <tim@paneris.co.uk> writes:
> We have had some discussions about teaching the parser to be smarter
> about choosing the type of numeric constants depending on context,
> but for now you need to force the issue:
> 
> select id from chapter where textid = 9057599501::int8;
> 
> If you want the index to be used then you'd better do this all the
> time, not only for values that are too big to be int4.
> 
This problem is actually happening through jdbc, using
PreparedStatements, 
shouldn't jdbc be able to deal with casting transparently?

I am calling this with a string "chapter = ?" which automatically quotes 
and escapes string values correctly.

Hope this isn't too wrong
timp


-- 
Member of http://www.paneris.org/


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: count() and multiple tables
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: count() and multiple tables