Re: psql: add \pset true/false - Mailing list pgsql-hackers

From Robert Haas
Subject Re: psql: add \pset true/false
Date
Msg-id CA+TgmoYNhwfj1uaAaV58ewTiMHFpzD95VEq=0=TitdKiN_7xJA@mail.gmail.com
Whole thread Raw
In response to psql: add \pset true/false  (Marko Tiikkaja <marko@joh.to>)
Responses Re: psql: add \pset true/false  (Greg Stark <stark@mit.edu>)
Re: psql: add \pset true/false  (Marko Tiikkaja <marko@joh.to>)
List pgsql-hackers
On Wed, Oct 28, 2015 at 10:03 AM, Marko Tiikkaja <marko@joh.to> wrote:
> Hello hello,
>
> Since the default t/f output for booleans is not very user friendly,
> attached is a patch which enables you to do for example the following:
>
> =# \pset true TRUE
> Boolean TRUE display is "TRUE".
> =# \pset false FALSE
> Boolean FALSE display is "FALSE".
> =# select true, false;
>   bool | bool
> ------+-------
>   TRUE | FALSE
> (1 row)
>
>
> (For anyone reviewing: I didn't touch the parts of describe.c which do this
> for nullPrint:
>
>   myopt.nullPrint = NULL;
>
> since I thought it was dubious in the first place, and I don't think we
> output booleans in the describe commands.)

-0 on this concept from me.  I'm not going to vigorously oppose it, but:

1. You can always do it in the query if you really want it.
2. If you're the sort of person liable to be confused by t/f, you
probably aren't in the target audience for psql anyway.
3. I really don't want to end up with a bunch of features of this type
for a variety of different data types.

But I just work here, and if others feel differently, so be it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Personal note: changing employers
Next
From: Greg Stark
Date:
Subject: Re: psql: add \pset true/false