Re: psql: add \pset true/false

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: psql: add \pset true/false
Дата
Msg-id
CAB7nPqQMOOLpZCGsuxUo9wK0nSRybC=hVBCz77Tt2mwtx9oytg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
psql: add \pset true/false Marko Tiikkaja <marko@joh.to>
Re: psql: add \pset true/false "Daniel Verite" <daniel@manitou-mail.org>
Re: psql: add \pset true/false Marko Tiikkaja <marko@joh.to>
Re: psql: add \pset true/false Tom Lane <tgl@sss.pgh.pa.us>
Re: psql: add \pset true/false Peter Eisentraut <peter_e@gmx.net>
Re: psql: add \pset true/false Tom Lane <tgl@sss.pgh.pa.us>
Re: psql: add \pset true/false Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: psql: add \pset true/false Peter Eisentraut <peter_e@gmx.net>
Re: psql: add \pset true/false Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: psql: add \pset true/false Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: psql: add \pset true/false Pavel Stehule <pavel.stehule@gmail.com>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false "Daniel Verite" <daniel@manitou-mail.org>
Re: psql: add \pset true/false Peter Eisentraut <peter_e@gmx.net>
Re: psql: add \pset true/false Peter Geoghegan <pg@heroku.com>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false "Daniel Verite" <daniel@manitou-mail.org>
Re: psql: add \pset true/false Michael Paquier <michael.paquier@gmail.com>
Re: psql: add \pset true/false Marko Tiikkaja <marko@joh.to>
Re: psql: add \pset true/false Brendan Jurd <direvus@gmail.com>
Re: psql: add \pset true/false Matthijs van der Vleuten <matthijs@zr40.nl>
Re: psql: add \pset true/false Vik Fearing <vik@2ndquadrant.fr>
Re: psql: add \pset true/false "Daniel Verite" <daniel@manitou-mail.org>
Re: psql: add \pset true/false Pavel Stehule <pavel.stehule@gmail.com>
Re: psql: add \pset true/false "David G. Johnston" <david.g.johnston@gmail.com>
Re: psql: add \pset true/false "David G. Johnston" <david.g.johnston@gmail.com>
Re: psql: add \pset true/false Vik Fearing <vik@2ndquadrant.fr>
Re: psql: add \pset true/false Robert Haas <robertmhaas@gmail.com>
Re: psql: add \pset true/false Marko Tiikkaja <marko@joh.to>
Re: psql: add \pset true/false Robert Haas <robertmhaas@gmail.com>
Re: psql: add \pset true/false Matthijs van der Vleuten <matthijs@zr40.nl>
Re: psql: add \pset true/false "David G. Johnston" <david.g.johnston@gmail.com>
Re: psql: add \pset true/false Greg Stark <stark@mit.edu>
Re: psql: add \pset true/false Andres Freund <andres@anarazel.de>
On Thu, Oct 29, 2015 at 10:50 PM, Tom Lane  wrote:
> Marko Tiikkaja  writes:
>> On 10/29/15 11:51 AM, Daniel Verite wrote:
>>> Personally I think it would be worth having, but how about
>>> booleans inside ROW() or composite types ?
>
>> There's not enough information sent over to do that in the client.
>> Note that this works the same way as  \pset null  with  SELECT
>> ROW(NULL), so I don't consider it a show stopper for the patch.
>
> The problem with that argument is that \pset null is already a kluge
> (but at least a datatype-independent one).  Now you've added a datatype
> specific kluge of the same ilk.  It might be useful, it might be short,
> but that doesn't make it not a kluge.

FWIW, I am -1 on the concept of enforcing output values for particular
datatypes because that's not the job of psql, and it is easy to do
that at query level (no comment about the existing \pset NULL stuff).

+    fprintf(output, _("  true               set the string to be
prined in place of a TRUE value\n"));
+    fprintf(output, _("  false              set the string to be
prined in place of a FALSE value\n"));
s/prined/printed/
-- 
Michael


В списке pgsql-hackers по дате отправления
От: Kouhei Kaigai
Дата:
Сообщение: Re: [DESIGN] ParallelAppend
От: Kouhei Kaigai
Дата:
FAQ