Re: psql: add \pset true/false

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Marko Tiikkaja <marko(at)joh(dot)to>, Daniel Verite <daniel(at)manitou-mail(dot)org>, PostgreSQL hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: add \pset true/false
Date: 2015-11-15 20:20:03
Message-ID: 5648E8F3.7070202@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/12/15 3:09 PM, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Plus we already have \pset numericlocale as a similar feature in psql.
>
> But \pset numericlocale is also a crock. It doesn't affect COPY output
> for instance, and its ability to identify which data types it should apply
> to is really shaky. And it's virtually unused, as demonstrated by the
> fact that serious bugs in it went undetected for many years (cf 4778a0bda,
> 77130fc14). That's a really poor advertisement for the usefulness of the
> proposed feature.

My $0.02 is that something that's type-specific belongs with the type,
not with clients.

As to the argument about displaying a check or an X, why should that
capability only exist for boolean types? For example, why not allow psql
to convert a numeric value into a bar of varying sizes? I've frequently
emulated that with something like SELECT repeat( '*', blah * 30 /
max_of_blah ). I'm sure there's other examples people could think of.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-11-15 21:24:24 Re: [PATCH] Refactoring of LWLock tranches
Previous Message Konstantin Knizhnik 2015-11-15 20:06:05 Re: eXtensible Transaction Manager API