"Chris Bandy" <bandy.ch...@gmail.com> writes:
> While using the information_schema to examine my tables, I found that
> "columns"."column_default" does not consistently represent the DEFAULT
> constraint/definition of a column.

> I would expect a column without a DEFAULT definition to return a null value,
> while a column with a DEFAULT definition would return the defined expression
> as a character value.

> In the following log, columns "a", "b" and "c" appear identical though their
> definitions differ.

I don't see anything to fix here.  The standard says that for a column
without any explicit default value, COLUMN_DEFAULT should be null.
But AFAICS there is room for implementation dependency in other cases.
In the particular cases you show here, PG recognizes some of them as
being equivalent to not having a default value, so for efficiency's sake
it converts them to that form.  I don't think we're bound to make every
such case work like that, though.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to