From: Kris Jurka <books@ejurka.com>
To: Thomas Hallgren <thomas@tada.se>
Cc: Postgres-JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: ResultSetMetaData + CachedResultSet bug
Date: Fri, 3 Nov 2006 02:22:44 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0611030220200.6037@leary2.csoft.net> (raw)
In-Reply-To: <44A4DC58.8030200@tada.se>
References: <032401c6960c$66ad1170$3a14a8c0@bossdev.com.ua>
<Pine.BSO.4.63.0606291837350.28844@leary2.csoft.net>
<44A4DC58.8030200@tada.se>
On Fri, 30 Jun 2006, Thomas Hallgren wrote:
> Kris Jurka wrote:
>>
>> [what to do about precision for non-numeric types]
>>
> I think the current -1 is reasonable for non numeric types. For the numeric
> types however, the interpretation should be that 0 is unlimited. A numeric
> should never return -1 and should accept setPrecision(colidx, 0) as 'no
> limit', i.e.
>
> 0 = unlimited
> -1 = not applicable
>
> The rationale is that a) stating that a varchar has zero decimal digits is
> wrong since it doesn't have any notion of decimal digits, and b) a precision
> of zero for a numeric doesn't make sense when interpreted verbatim.
>
The latest javadocs have clarified what they expect precision to mean for
non-numeric datatypes.
http://download.java.net/jdk6/docs/api/java/sql/ResultSetMetaData.html#getPrecision(int)
I've adjusted the driver to follow the new rules and not return -1
anymore.
Kris Jurka
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-jdbc@postgresql.org
Cc: books@ejurka.com, thomas@tada.se
Subject: Re: ResultSetMetaData + CachedResultSet bug
In-Reply-To: <Pine.BSO.4.63.0611030220200.6037@leary2.csoft.net>
References: <032401c6960c$66ad1170$3a14a8c0@bossdev.com.ua> <Pine.BSO.4.63.0606291837350.28844@leary2.csoft.net> <44A4DC58.8030200@tada.se> <Pine.BSO.4.63.0611030220200.6037@leary2.csoft.net>
* 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