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

From: Tim Pizey <tim(at)paneris(dot)co(dot)uk>
To:
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Invalid (null) int8, can't convert to float8
Date: 2001-03-20 00:40:46
Message-ID: 3AB6A70E.3B90236B@paneris.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks a lot Tom,

Tom Lane wrote:
>
> Tim Pizey <tim(at)paneris(dot)co(dot)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/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-03-20 01:23:24 Re: count() and multiple tables
Previous Message Joseph Shraibman 2001-03-20 00:02:23 Re: count() and multiple tables