Re: 7.4's INFORMATION_SCHEMA.Columns View

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mike(dot)griffin(at)mygenerationsoftware(dot)com
Cc: "Bruno Wolff III" <bruno(at)wolff(dot)to>, pgsql-general(at)postgresql(dot)org
Subject: Re: 7.4's INFORMATION_SCHEMA.Columns View
Date: 2004-06-19 01:30:13
Message-ID: 5725.1087608613@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>> The SQL spec doesn't allow unconstrained lengths for these types
>>> so it gives no guidance about what to display in the information_schema
>>> views. Any opinions?
>>
>> If there isn't a set scale for the type, then NULL would probably make the
>> most sense.

After more thought I like returning NULL for both precision and scale in
the case of unconstrained numeric columns. Any other value is
arbitrary. In particular, the 1000 cited in the docs is *very*
arbitrary, and I don't think it actually constrains what you can store,
only what you can declare as a column precision. [tries it...] Yup,
I can store "power(10.0, 10000)" in an unconstrained numeric column.
It seems to fail around 10^140000 but I'm not sure where that limit
is coming from exactly...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-06-19 01:45:38 Re: RHEL 2.1 rpms for 7.4.2
Previous Message Tom Lane 2004-06-19 01:18:25 Re: 7.4's INFORMATION_SCHEMA.Columns View