From: Nebojsa Vasiljevic <nebojsa@sw4i.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Cc: amit.handa@sun.com
Cc: kmacclay@vantage.com
Cc: bmaguire@vantage.com
Subject: Re: SQLException: Invalid precision value. Cannot be less than zero
Date: Thu, 10 Feb 2005 10:50:25 +0100
Message-ID: <002801c50f55$f25a2d00$ad00a8c0@mediacenter.org.yu> (raw)
References: <000901c50ef7$b787f9e0$ad00a8c0@mediacenter.org.yu>
<Pine.BSO.4.56.0502100304200.6761@leary.csoft.net>
> This has been discussed, partially offlist, with Sun in the context of
> getColumnDisplaySize returning -1 for text and varchar with no length
> attribute fields. I've been waiting for a suggestion from Sun on what
> value to use, or if they will alter their code to remove this check.
javax.sql.rowset.RowSetMetaDataImpl class is part of Sun JDK 1.5.
I don't like Sun forces nonegative values in
javax.sql.rowset.RowSetMetaDataImpl,
but we can't change it. Sun will not change the JDK to make PosgreSQL driver
work.
Don't wait for Sun's suggestion, just look how other drivers works.
>
> Your suggestion of using 0 passes their check, but still isn't legal:
>
> jurka=# create table nt (a numeric(0,0));
> ERROR: NUMERIC precision 0 must be between 1 and 1000
"create table nt (a numeric(0,0))" is as illegal as "create table nt (a
numeric(-1,-1))".
Precision 0 stands for "create table nt (a numeric)".
Nebojsa
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: nebojsa@sw4i.com, books@ejurka.com, amit.handa@sun.com, kmacclay@vantage.com, bmaguire@vantage.com
Subject: Re: SQLException: Invalid precision value. Cannot be less than zero
In-Reply-To: <002801c50f55$f25a2d00$ad00a8c0@mediacenter.org.yu>
References: <000901c50ef7$b787f9e0$ad00a8c0@mediacenter.org.yu> <Pine.BSO.4.56.0502100304200.6761@leary.csoft.net> <002801c50f55$f25a2d00$ad00a8c0@mediacenter.org.yu>
* 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