| From: | Alexandre GRAIL <postgresql(dot)general(at)augure(dot)net> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Casting Integer to Boolean in assignment |
| Date: | 2019-01-24 17:39:14 |
| Message-ID: | e45cf6e4-33ac-52b6-5a32-fd67b788c7c3@augure-ng.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 <https://augure-engineering.fr>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kaushal Shriyan | 2019-01-24 18:06:56 | Recommended Hardware requirements for PostgreSQL DB Server. |
| Previous Message | Alexandre GRAIL | 2019-01-24 17:26:06 | Re: Casting Integer to Boolean in assignment |