pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dario Fassi <dariovfassi@yahoo.com.ar>
To: pgsql-jdbc@postgresql.org
Subject: Error in DatabaseMetaData.getColumns() with Views
Date: Fri, 02 Jul 2004 22:14:54 -0300
Message-ID: <40E6088E.6030703@yahoo.com.ar> (raw)

Hi, I wish 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 from DatabaseMetaData.

Any suggestion will be appreciated.
Best regards,
Dario Fassi

view thread (11+ messages)  latest in thread

Message-ID: <40E6088E.6030703@yahoo.com.ar>
Permalink:  ../40E6088E.6030703@yahoo.com.ar/
Also on:    postgresql.org/message-id/40E6088E.6030703@yahoo.com.ar

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dariovfassi@yahoo.com.ar, pgsql-jdbc@postgresql.org
  Subject: Re: Error in DatabaseMetaData.getColumns() with Views
  In-Reply-To: <40E6088E.6030703@yahoo.com.ar>

* 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