Re: Fwd: PATCH: psql boolean display - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fwd: PATCH: psql boolean display
Date
Msg-id 23034.1346598346@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fwd: PATCH: psql boolean display  (Phil Sorber <phil@omniti.com>)
Responses Re: Fwd: PATCH: psql boolean display
List pgsql-hackers
Phil Sorber <phil@omniti.com> writes:
> What my patch was intended to do was let the end user set boolean
> output to any arbitrary values. While foo/bar is pretty useless, it
> was meant to reinforce that it was capable of any arbitrary value. I
> can think of a decent list of other output an end user might want,
> such as:

> true/false
> yes/no
> y/n
> on/off
> 1/0
> enabled/disabled

> Plus the different capitalized forms.

I can readily see that people might want boolean columns displayed in
such ways in custom applications.  I'm less convinced that there is much
use for it in psql, though.  In the big scheme of things, psql is a
rather low-level tool, designed for DBAs and SQL programmers.  I'd get
quite upset if psql failed to tell me the truth about what was in a
table I was looking at --- and a feature like this comes pretty close
to not telling the truth, especially if it kicks in on a column I
wasn't expecting it to.

On the whole I think this sort of substitution belongs in a
user-written-application layer of software, not in any of the tools
we supply.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Phil Sorber
Date:
Subject: Re: Fwd: PATCH: psql boolean display
Next
From: Sergey Koposov
Date:
Subject: Re: bitmap scan much slower than index scan, hash_search_with_hash_value