Re: Boolean casting in 7.3 -> changed?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Boolean casting in 7.3 -> changed?
Дата
Msg-id Pine.LNX.4.44.0211271943140.12428-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Boolean casting in 7.3 -> changed?  (Ian Barwick <barwick@gmx.net>)
Ответы Re: Boolean casting in 7.3 -> changed?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Boolean casting in 7.3 -> changed?  (David Walker <pgsql@grax.com>)
Список pgsql-hackers
Ian Barwick writes:

> "Casting integers to boolean (for example, 0::bool) is no longer allowed,
> use '0'::bool instead".

This advice would probably only cause more confusion, because we are now
moving into the direction that character strings are no longer acceptable
as numeric data.

Note that

x <> 0

is also a perfectly good way to convert integers to booleans, and a more
portable one at that.

Finally, you can always create your own cast.

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fw: PostgreSQL 7.3 Platform Testing
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: [spam] Re: [mail] Re: Native Win32 sources