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

From Peter Eisentraut
Subject Re: psql: add \pset true/false
Date
Msg-id 5644FCE0.2030405@gmx.net
Whole thread Raw
In response to Re: psql: add \pset true/false  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql: add \pset true/false  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 10/29/15 9:50 AM, Tom Lane wrote:
> The really key argument that hasn't been addressed here is why does such
> a behavior belong in psql, rather than elsewhere?

Because it is the job of the client to mangle the data so that it suits
the purposes of the client.  What comes over the wire is part of the
protocol, not part of the client display.  Language drivers do this sort
of mangling all the time.

> Surely legibility problems aren't unique to psql users.

But the way to deal with it is specific to psql.  In a graphical
environment you might want a checkbox instead, say.  Different clients
will have different requirements and preferences.

> Moreover, there are exactly
> parallel facilities for other datatypes on the server side: think
> DateStyle or bytea_output.

Surely DateStyle is legacy, and bytea_output was actually a performance
feature.  And clients will still mangle either type into their own formats.

Plus we already have \pset numericlocale as a similar feature in psql.




pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: psql: add \pset true/false
Next
From: Tom Lane
Date:
Subject: Re: Inaccurate results from numeric ln(), log(), exp() and pow()