Re: BUG #1839: insert into table (column) values (nullif('',''));

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1839: insert into table (column) values (nullif('',''));
Дата
Msg-id 16159.1124724396@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1839: insert into table (column) values (nullif('',''));  ("Matt" <survivedsushi@yahoo.com>)
Список pgsql-bugs
"Matt" <survivedsushi@yahoo.com> writes:
> insert into table (column) values (nullif('',''));
> ERROR: column "column" is of type boolean but
> expression is of type text.

Seems reasonable to me.  What type would you expect '' to be?

> It works in MSSQL.

If you think silent conversions from text to boolean are a good idea,
use MSSQL.  (Or create a cast to make PG do it ... but implicit
conversions across datatype categories are generally a bad idea in
my experience.  They tend to fire in cases where you didn't expect it.)

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: BUG #1839: insert into table (column) values (nullif('',''));
Следующее
От: Jorg Heymans
Дата:
Сообщение: Re: importing 0xe3809c character, aka wave dash