Re: Boolean output format - Mailing list pgsql-general

From Tom Lane
Subject Re: Boolean output format
Date
Msg-id 600.1033789390@sss.pgh.pa.us
Whole thread Raw
In response to Re: Boolean output format  (Jeff Davis <list-pgsql-general@empires.org>)
Responses Re: Boolean output format  (Jeff Davis <list-pgsql-general@empires.org>)
Re: Boolean output format  (Garo Hussenjian <garo@xapnet.com>)
List pgsql-general
Jeff Davis <list-pgsql-general@empires.org> writes:
> The developers tend to like general solutions, like the user-defined data
> types and the constraints. It's generally pretty difficult to get a new SET
> variable added, so it's unlikely they'd go for that for just a boolean
> conversion.

My two cents (not speaking for core or anything like that, just personal
reaction): my first thought was that SET BOOLEANSTYLE was a reasonable
idea, seeing as how we have SET DATESTYLE.  But on second thought I
didn't like it so much.  Seems like providing such a choice would be
likely to break those client-side adapters that have gone to the trouble
of correctly interpreting Postgres booleans into their host languages.
Those adapters are going to handle 't' and 'f', but in all probability
they will break if you run them with BOOLEANSTYLE set to anything but
'traditional'.  So on reflection this feature seems like it will
penalize the folks who tried to do things right, to reward those who
couldn't be bothered.

Maybe that's stating it too strongly, but there is a definite backwards-
compatibility issue to be considered here.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Deadlock
Next
From: Garo Hussenjian
Date:
Subject: Re: Boolean output format