X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1CD6C8B9D5D for ; Thu, 10 Feb 2005 09:50:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39807-05 for ; Thu, 10 Feb 2005 09:50:33 +0000 (GMT) Received: from mail.b92.net (free.b92.net [212.102.128.4]) by svr1.postgresql.org (Postfix) with ESMTP id EEBBA8B9EDD for ; Thu, 10 Feb 2005 09:50:33 +0000 (GMT) Received: (qmail 16744 invoked from network); 10 Feb 2005 09:50:27 -0000 Received: from nbg-i73.dial.b92.net (HELO nebojsa) (212.102.134.206) by mail.b92.net with SMTP; 10 Feb 2005 09:50:26 -0000 Message-ID: <002801c50f55$f25a2d00$ad00a8c0@mediacenter.org.yu> From: "Nebojsa Vasiljevic" To: "Kris Jurka" Cc: , , , References: <000901c50ef7$b787f9e0$ad00a8c0@mediacenter.org.yu> Subject: Re: SQLException: Invalid precision value. Cannot be less than zero Date: Thu, 10 Feb 2005 10:50:25 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/56 X-Sequence-Number: 12236 > 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