Skip site navigation (1) Skip section navigation (2)

Re: Unicode UTF-8 table formatting for psql text output

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Roger Leigh <rleigh(at)codelibre(dot)net>, "Brad T(dot) Sliger" <brad(at)sliger(dot)org>, pgsql-hackers(at)postgresql(dot)org, Selena Deckelmann <selenamarie(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Roger Leigh <rleigh(at)debian(dot)org>
Subject: Re: Unicode UTF-8 table formatting for psql text output
Date: 2009-09-30 18:16:36
Message-ID: 603c8f070909301116u702a6cfem150f116cb817b6a7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Sep 30, 2009 at 1:27 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On Wed, 2009-09-30 at 12:06 -0400, Robert Haas wrote:
>> On Wed, Sep 30, 2009 at 11:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> >> Thinking about this some more, ISTM a much better way of approaching it
>> >> would be to provide a flag for psql to turn off the fancy formatting,
>> >> and have pg_regress use that flag.
>> >
>> > Yeah, that's not a bad idea.  There are likely to be other client
>> > programs that won't want this behavioral change either.
>>
>> I'm surprised there isn't one already.  I would think that any new
>> format would default to off.
>
> Well, this isn't a new format, just an enhancement of an existing
> format.

I disagree.  This patch is about replacing ASCII art constructed using
| and + and replacing it with box-drawing characters.  I think the
chances that this will not look good in one or more of the terminal
emulators that I use from time to time are excellent, especially if
the approach is at all similar to what pstree does on recent versions
of Fedora.  I'm 100% not interested in tracking down some obscure
encoding/locale issue to make it show up right, and I'm 110% not
interested in helping the people who file bug reports to track down
the analagous issues in their crazy, broken environments.

The way it works right now (and has worked for the last 5 years or
more) is reliable, familiar, and, at least IME, bullet-proof.  I don't
even see a good case for changing the default, let alone not providing
a way to retreat to the old behavior.  Considering that this patch is
nothing more than an exceedingly minor piece of window-dressing,
taking even a small risk of breaking things for anyone who as of today
can log into psql and get work done without pain seems like a bad
trade-off to me.

...Robert

In response to

Responses

pgsql-hackers by date

Next:From: Roger LeighDate: 2009-09-30 18:21:06
Subject: Re: Unicode UTF-8 table formatting for psql text output
Previous:From: Alvaro HerreraDate: 2009-09-30 18:11:10
Subject: Re: CommitFest 2009-09, two weeks on

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group