Thread: more incorrect values for DatabaseMetaData.getColumns()

more incorrect values for DatabaseMetaData.getColumns()

From
Craig Longman
Date:
just also noticed that the date values are coming back with a
COLUMN_SIZE of 8 (again, storage i guess?) whereas the other databases
are coming back with 26.

cheers,

--

     CraigL->Thx();
     Be Developer ID: 5852


Attachment

Re: more incorrect values for DatabaseMetaData.getColumns()

From
Dave Cramer
Date:
Does anybody know what the definitive answer is here?

dave
On Sat, 2002-06-08 at 10:21, Craig Longman wrote:
>
> just also noticed that the date values are coming back with a
> COLUMN_SIZE of 8 (again, storage i guess?) whereas the other databases
> are coming back with 26.
>
> cheers,
>
> --
>
>      CraigL->Thx();
>      Be Developer ID: 5852
>




Re: more incorrect values for DatabaseMetaData.getColumns()

From
Craig Longman
Date:
On Mon, 2002-06-10 at 09:32, Dave Cramer wrote:
> Does anybody know what the definitive answer is here?

i'm basing my assertion that the pgsql interpretation is mistaken on the
docs from the jdk 1.1 api.  the DatabaseMetaData.getColumns() describes
the ResultSet returned, and column #7 is the COLUMN_SIZE, it says this:

    7. COLUMN_SIZE int => column size.  For char or date types, this
       is the maximum number of characters, for numeric or decimal types
       this is precision.

as seen at:

http://java.sun.com/products/jdk/1.1/docs/api/java.sql.DatabaseMetaData.html

so, i don't know if '26' is the right answer for the length of the dates
in pgsql, but i do know its longer than 8.

in some ways, i think the pgsql answer makes more sense (returning
storage space), but it is definitely not the same information that the
other databases return for this column.

> On Sat, 2002-06-08 at 10:21, Craig Longman wrote:
> >
> > just also noticed that the date values are coming back with a
> > COLUMN_SIZE of 8 (again, storage i guess?) whereas the other databases
> > are coming back with 26.

--

     CraigL->Thx();
     Be Developer ID: 5852


Attachment

Re: more incorrect values for DatabaseMetaData.getColumns()

From
Bruce Momjian
Date:
Dave Cramer wrote:
> Does anybody know what the definitive answer is here?
>
> dave
> On Sat, 2002-06-08 at 10:21, Craig Longman wrote:
> >
> > just also noticed that the date values are coming back with a
> > COLUMN_SIZE of 8 (again, storage i guess?) whereas the other databases
> > are coming back with 26.

That 26 must be characters of display.   Not sure which value is
supposed to be returned.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026