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 C8B25D1B298 for ; Fri, 2 Jul 2004 22:02:23 -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 60816-01 for ; Sat, 3 Jul 2004 01:02:17 +0000 (GMT) Received: from sun2.techtelnet.net (unknown [200.69.128.98]) by svr1.postgresql.org (Postfix) with ESMTP id E5C61D1B347 for ; Fri, 2 Jul 2004 22:02:11 -0300 (ADT) Received: (qmail 27096 invoked from network); 3 Jul 2004 01:01:43 -0000 Received: from unknown (HELO sistemat.com.ar) (dfassi@sistemat.com.ar@[200.80.239.18]) (envelope-sender ) by mail (qmail-ldap-1.03) with SMTP for ; 3 Jul 2004 01:01:43 -0000 Message-ID: <40E6076C.30105@sistemat.com.ar> Date: Fri, 02 Jul 2004 22:10:04 -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: pgsql-jdbc@postgresql.org Subject: Error in DatabaseMetaData TableColumn lenght.dec information Content-Type: multipart/alternative; boundary="------------050207030203070606060106" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.4 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: * X-Archive-Number: 200407/23 X-Sequence-Number: 10407 This is a multi-part message in MIME format. --------------050207030203070606060106 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I whish to report a erroneous information returned by DatabaseMetaData.getColumns() method. This happens with ResultSet's column (7) COLUMN_SIZE and (9) DECIMAL_DIGITS , when DatabaseMetaData.getColumns() inform about a VIEW with columns formed with : coalesce , case or numeric operations over DECIMAL fields. 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 ) This error its very molest because if you are trying to do CodeGeneration tools from DatabaseMetaData , you get lost. Any suggestion will be appreciated. Best regards, Dario V. Fassi SISTEMATICA ingenieria de software srl Ituzaingo 1628 (2000) Rosario, Santa Fe, Argentina. Tel / Fax: +54 (341) 485.1432 / 485.1353 --------------050207030203070606060106 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I whish to report a erroneous information returned by   DatabaseMetaData.getColumns()  method.

This happens with ResultSet's column (7) COLUMN_SIZE  and  (9) DECIMAL_DIGITS ,
when DatabaseMetaData.getColumns() inform about a VIEW with columns formed with :
coalesce , case or numeric operations over DECIMAL fields.

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 )

This error its very molest because if you are trying to do CodeGeneration tools from DatabaseMetaData , you get lost.

Any suggestion will be appreciated.
Best regards,

    Dario V. Fassi


SISTEMATICA ingenieria de software  srl
Ituzaingo 1628  (2000)  Rosario, Santa Fe, Argentina.
Tel / Fax:  +54 (341) 485.1432 / 485.1353



--------------050207030203070606060106--