On Sunday 31 May 2009 18:41:55 Tom Lane wrote:
> AFAICS, the SQL standard demands that precision and scale fields be
> non-null all the time for those data types where they make sense
> (this is encoded in the CHECK CONSTRAINTs that are declared for the
> various information-schema tables, see particularly 21.15
> DATA_TYPE_DESCRIPTOR base table in SQL99). DATE is clearly wrong
> per spec, but it's not the only problem.
The DATE change is the only thing I'd be prepared to make right now.
> Our interpretation has been to set these values to null if the typmod
> is defaulted, which is reasonable in the abstract but it's still a
> violation of spec. I wonder whether we should be inserting some large
> limit value instead.
That is something to think about, but it needs more time. We also have some
inconsistency there; for example we produce a large limit value for octet
length. Needs more thought. And if we go down that route, it should also
require less hardcoding of numbers into information_schema.sql.