Re: Failure to coerce unknown type to specific type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Failure to coerce unknown type to specific type
Дата
Msg-id 1430.1428543112@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Failure to coerce unknown type to specific type  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Failure to coerce unknown type to specific type  (Jeff Davis <pgsql@j-davis.com>)
Re: Failure to coerce unknown type to specific type  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-bugs
Jeff Davis <pgsql@j-davis.com> writes:
> Original report and patch by Karl Schnaitter.
> create table a(u) as select '1';

We should, in fact, fail that to begin with.  Unknown-type columns are
a spectactularly horrid idea.

> This can be fixed by a small change (attached) to find_coercion_pathway to add:

>     else if (sourceTypeId == UNKNOWNOID)
>         result = COERCION_PATH_COERCEVIAIO;

This is not a good idea, I think.  I definitely don't accept any reasoning
that starts from the premise that UNKNOWN is a first-class type.

            regards, tom lane

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Failure to coerce unknown type to specific type
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Failure to coerce unknown type to specific type