From: Tim Pizey <tim@paneris.co.uk>
Cc: pgsql-sql@postgresql.org
Subject: Re: Invalid (null) int8, can't convert to float8
Date: Tue, 20 Mar 2001 00:40:46 +0000
Message-ID: <3AB6A70E.3B90236B@paneris.co.uk> (raw)
References: <3AB6417C.A4932BA4@paneris.co.uk>
<20699.985027478@sss.pgh.pa.us>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tim@paneris.co.uk
Subject: Re: Invalid (null) int8, can't convert to float8
In-Reply-To: <3AB6A70E.3B90236B@paneris.co.uk>
References: <3AB6417C.A4932BA4@paneris.co.uk> <20699.985027478@sss.pgh.pa.us> <3AB6A70E.3B90236B@paneris.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox