Re: Possible bug on insert

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Possible bug on insert
Дата
Msg-id 429.1065467047@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Possible bug on insert  ("Rick Gigger" <rick@alpinenetworking.com>)
Список pgsql-general
"Rick Gigger" <rick@alpinenetworking.com> writes:
> insert into bugtest (a) select '1' union select '1'; -- this one fails

> Is this a bug?

No.  It's unfortunate perhaps, but it's not a bug.  The UNION forces us
to make a decision about the output datatype of the UNION operation.
In your other cases the chosen datatype is integer, which can later be
cast to smallint for the insert, but in this case the chosen datatype is
text, which is not implicitly castable to smallint.

            regards, tom lane

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

Предыдущее
От: "Rick Gigger"
Дата:
Сообщение: Re: Possible bug on insert
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_restore takes ages