From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marko Tiikkaja <marko@joh.to>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: PostgreSQL hackers <pgsql-hackers@postgresql.org>
Subject: Re: psql: add \pset true/false
Date: Thu, 29 Oct 2015 09:50:27 -0400
Message-ID: <27336.1446126627@sss.pgh.pa.us> (raw)
In-Reply-To: <5631FCAF.9060204@joh.to>
References: <0949c317-3ec4-4516-a3aa-33a6cfbf5267@mm>
<5631FCAF.9060204@joh.to>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Marko Tiikkaja <marko@joh.to> 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.
The really key argument that hasn't been addressed here is why does such
a behavior belong in psql, rather than elsewhere? Surely legibility
problems aren't unique to psql users. Moreover, there are exactly
parallel facilities for other datatypes on the server side: think
DateStyle or bytea_output. So if you were trying to follow precedent
rather than invent a kluge, you'd have submitted a patch to create a GUC
that changes the output of boolout().
Now, that would create a debate about backwards compatibility and whether
making bool output more readable was worth possibly breaking some
applications, but I do not think this patch should escape scrutiny for the
same issue. There are plenty of people with shell scripts that look at
psql output, which might get broken by careless use of this \pset.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, marko@joh.to, daniel@manitou-mail.org
Subject: Re: psql: add \pset true/false
In-Reply-To: <27336.1446126627@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox