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 E21E8D1B181 for ; Sat, 10 Jul 2004 14:16:29 -0300 (ADT) 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 78715-06 for ; Sat, 10 Jul 2004 17:16:22 +0000 (GMT) Received: from mail.svhost.com.ar (mail.svhost.com.ar [200.80.239.22]) by svr1.postgresql.org (Postfix) with ESMTP id 9B7A4D1B18F for ; Sat, 10 Jul 2004 14:16:20 -0300 (ADT) Received: from sistemat.com.ar (devel.sistemat.com.ar [192.168.1.40]) by mail.svhost.com.ar (Postfix) with ESMTP id 0E3A5239EE; Sat, 10 Jul 2004 14:14:57 -0300 (ART) Message-ID: <40F02681.2010209@sistemat.com.ar> Date: Sat, 10 Jul 2004 14:25:21 -0300 From: "Dario V. Fassi" Organization: SISTEMATICA ingenieria de software srl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: es, es-ar, en-us, en MIME-Version: 1.0 To: Kris Jurka , pgsql-jdbc@postgresql.org Subject: Re: Error in DatabaseMetaData TableColumn lenght.dec information References: <40E6076C.30105@sistemat.com.ar> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060605030305010305080804" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.0 tagged_above=0.0 required=5.0 tests=HTML_20_30, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: * X-Archive-Number: 200407/87 X-Sequence-Number: 10471 This is a multi-part message in MIME format. --------------060605030305010305080804 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Kris Jurka wrote: >On Fri, 2 Jul 2004, Dario V. Fassi wrote: > > > >>Hi, I whish to report a erroneous information returned by >>DatabaseMetaData.getColumns() method. >> >>Suppose >> >>CREATE TABLE A ( f1 DEC(6,3), f2 dec(6,3) ); >>CREATE VIEW B as ( select ( f1 + f2 ) as f from a; >> >>Then DatabaseMetaData.getColumns() returns: >> >>VIEW B >> F NUMERIC( 65535 , -65531 ) >> >> >> > >I've modified the cvs version of the driver to return numeric(1000,1000) >which is the maximum precision and scale you are allowed to define. A >more complete solution is outside the realm of the JDBC driver. > >Kris Jurka > > Kris, A return value of numeric(1000,1000) , is far better than numeric(65535,-65531) , but this mean a number with all the presicion in the fractional part and is not very usefull. Why not a more login value like "Numeric(100,50)" , yet oversized but more appropiate. Can you imagine a number with 1000 digit's presicion, it's impractical and undisplayable. Dario Fassi. --------------060605030305010305080804 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Kris Jurka wrote:
On Fri, 2 Jul 2004, Dario V. Fassi wrote:

  
Hi, I whish to report a erroneous information returned by   
DatabaseMetaData.getColumns()  method.

Suppose

CREATE TABLE A (  f1 DEC(6,3), f2 dec(6,3) );
CREATE VIEW B as ( select ( f1 + f2 ) as f from a;

Then DatabaseMetaData.getColumns() returns:

VIEW B
    F   NUMERIC(  65535 ,  -65531 )

    

I've modified the cvs version of the driver to return numeric(1000,1000) 
which is the maximum precision and scale you are allowed to define.  A 
more complete solution is outside the realm of the JDBC driver.

Kris Jurka
  
Kris,

A return value of numeric(1000,1000) , is far better than  numeric(65535,-65531) , but this mean a number with all the presicion in the fractional part and is not very usefull.

Why not a more login value like    "Numeric(100,50)"  , yet oversized but more appropiate.
Can you imagine a number with 1000 digit's presicion, it's impractical and undisplayable.

Dario Fassi.

--------------060605030305010305080804--