Re: Casting INT4 to BOOL...

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Casting INT4 to BOOL...
Дата
Msg-id 1097468235.14940.18.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Casting INT4 to BOOL...  (Sean Chittenden <chitt@speakeasy.net>)
Ответы Re: Casting INT4 to BOOL...  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Casting INT4 to BOOL...  (Sean Chittenden <chitt@speakeasy.net>)
Список pgsql-patches
On Sun, 2004-10-10 at 16:27, Sean Chittenden wrote:
> Is there any reason why the backend doesn't cast an unquoted integer to
> a boolean value?

Can you add some regression tests, please?

The patch treats any non-zero value as "true". Is that the behavior we
want, or should we only allow "1" as an integer representation of
"true"? (I'm not sure myself, I just don't think copying C here is
necessarily the best guide.)

The patch changes the system catalog; it probably ought to also bump the
catalog version number. That also means this probably isn't 8.0
material, unless we make an unrelated system catalog change in a future
beta (... and even then, I'm not sure if I'd cal it a bug fix).

-Neil



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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: minor code cleanup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Casting INT4 to BOOL...