Re: Fwd: PATCH: psql boolean display

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: PATCH: psql boolean display
Дата
Msg-id 23034.1346598346@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fwd: PATCH: psql boolean display  (Phil Sorber <phil@omniti.com>)
Ответы Re: Fwd: PATCH: psql boolean display  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Phil Sorber
Дата:
Сообщение: Re: Fwd: PATCH: psql boolean display
Следующее
От: Sergey Koposov
Дата:
Сообщение: Re: bitmap scan much slower than index scan, hash_search_with_hash_value