Re: Boolean casting in 7.3 -> changed?

Поиск
Список
Период
Сортировка
От David Walker
Тема Re: Boolean casting in 7.3 -> changed?
Дата
Msg-id 200211271834.12241.pgsql@grax.com
обсуждение исходный текст
Ответ на Re: Boolean casting in 7.3 -> changed?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Boolean casting in 7.3 -> changed?  (David Wheeler <david@wheeler.net>)
Список pgsql-hackers
Does this mean that in the future '342' may not be valid as an insert into a 
numeric field and that we should be using 342 instead?

On Wednesday 27 November 2002 05:07 pm, (Via wrote:
> 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.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Planning for improved versions of IN/NOT IN
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: v7.3 Packaged ...