Re: SQLException: Invalid precision value. Cannot be less

From: Kris Jurka <books(at)ejurka(dot)com>
To: Nebojsa Vasiljevic <nebojsa(at)sw4i(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, amit(dot)handa(at)sun(dot)com, kmacclay(at)vantage(dot)com, bmaguire(at)vantage(dot)com
Subject: Re: SQLException: Invalid precision value. Cannot be less
Date: 2005-02-10 08:12:00
Message-ID: Pine.BSO.4.56.0502100304200.6761@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, 9 Feb 2005, Nebojsa Vasiljevic wrote:

> [CachedRowSet doesn't like -1 precision values for numeric]

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.

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

The -1 value is intended to indicate we don't know or unlimited or
similar and I don't particularly like it, but I've yet to hear a better
suggestion.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Xavier Poinsard 2005-02-10 09:00:32 Re: Crystal Reports / PostgreSQL
Previous Message Kris Jurka 2005-02-10 08:02:03 Re: Fwd: Problem with deleting row