Re: Casting Integer to Boolean in assignment - Mailing list pgsql-general

From Alexandre GRAIL
Subject Re: Casting Integer to Boolean in assignment
Date
Msg-id e45cf6e4-33ac-52b6-5a32-fd67b788c7c3@augure-ng.fr
Whole thread Raw
In response to Re: Casting Integer to Boolean in assignment  (Geoff Winkless <pgsqladmin@geoff.dj>)
List 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
Attachment

pgsql-general by date:

Previous
From: Alexandre GRAIL
Date:
Subject: Re: Casting Integer to Boolean in assignment
Next
From: Kaushal Shriyan
Date:
Subject: Recommended Hardware requirements for PostgreSQL DB Server.