Re: psql: add \pset true/false
От | Robert Haas |
---|---|
Тема | Re: psql: add \pset true/false |
Дата | |
Msg-id | CA+TgmoYNhwfj1uaAaV58ewTiMHFpzD95VEq=0=TitdKiN_7xJA@mail.gmail.com обсуждение исходный текст |
Ответ на | psql: add \pset true/false (Marko Tiikkaja <marko@joh.to>) |
Ответы |
Re: psql: add \pset true/false
Re: psql: add \pset true/false |
Список | 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 по дате отправления: