Re: Casting Integer to Boolean in assignment

Поиск
Список
Период
Сортировка
От Alexandre GRAIL
Тема Re: Casting Integer to Boolean in assignment
Дата
Msg-id e45cf6e4-33ac-52b6-5a32-fd67b788c7c3@augure-ng.fr
обсуждение исходный текст
Ответ на Re: Casting Integer to Boolean in assignment  (Geoff Winkless <pgsqladmin@geoff.dj>)
Список pgsql-general

On 24/01/2019 17:19, Geoff Winkless wrote:
Like you say it is a matter of opinion. The projects opinion is here:

https://www.postgresql.org/docs/11/datatype-boolean.html

and it works for me.
And you're welcome to it. I'm not arguing for it changing. I'm simply
stating that I'm very pleased that the default behaviour can be
changed, because in my opinion writing a bunch of explicit casts in a
query is a surefire path to unreadable code.

And it may be just a matter of opinion but for me 0 and 1 "naked", *do* represent boolean value. More than 't' or 'f', if you consider all the computer history...

In the end it would be very nice to add a pointer in the documentation about this behavior and a quick workaround for the ones who really need it. That would be great :D !

Thanks all !







--
Alexandre GRAIL
Ingénieur Logiciel // Chef de Projet
Tél. +33 6 27 40 77 44
Augure Engineering
Вложения

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

Предыдущее
От: Alexandre GRAIL
Дата:
Сообщение: Re: Casting Integer to Boolean in assignment
Следующее
От: Kaushal Shriyan
Дата:
Сообщение: Recommended Hardware requirements for PostgreSQL DB Server.