Re: BUG #6080: information_schema.columns.column_default contains NULL inconsistently

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6080: information_schema.columns.column_default contains NULL inconsistently
Дата
Msg-id 107.1309577721@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #6080: information_schema.columns.column_default contains NULL inconsistently  ("Chris Bandy" <bandy.chris@gmail.com>)
Ответы Re: BUG #6080: information_schema.columns.column_default contains NULL inconsistently  (Chris Bandy <bandy.chris@gmail.com>)
Список pgsql-bugs
"Chris Bandy" <bandy.chris@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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug with plpgsql, temp tables and TOAST?
Следующее
От: "Maksym Boguk"
Дата:
Сообщение: BUG #6088: copy to stdout cannot be stopped with kill(pid) or pg_terminate_backend