Re: Unicode UTF-8 table formatting for psql text output - Mailing list pgsql-hackers

From Roger Leigh
Subject Re: Unicode UTF-8 table formatting for psql text output
Date
Msg-id 20090930182106.GA7896@codelibre.net
Whole thread Raw
In response to Re: Unicode UTF-8 table formatting for psql text output  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Unicode UTF-8 table formatting for psql text output
List pgsql-hackers
On Wed, Sep 30, 2009 at 01:30:17PM -0400, Andrew Dunstan wrote:
>
>
> Peter Eisentraut wrote:
>> On Wed, 2009-09-30 at 11:03 -0400, Andrew Dunstan wrote:
>>
>>> 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.
>>>
>>
>> Well, it might not be a bad idea, but adding a feature just to satisfy
>> the test suite instead of fixing the test suite doesn't feel satisfying.
>> Is there another use case?
>
> Sure, as Tom noted pg_regress probably won't be the only user. There are
> lots of legacy scripts out there that parse psql output, and it should
> be of use to them.

The attached patch implements this feature.  It adds a
--no-pretty-formatting/-G option to psql (naming isn't my forté,
so feel free to change it!).  This is also documented in the
SGML docs, and help text.  Lastly, this option is used when invoking
psql by pg_regress, which results in a working testsuite in a UTF-8
locale.

Hopefully this is OK!  I'll be happy to make any amendments required.


Regards,
Roger

--
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Unicode UTF-8 table formatting for psql text output
Next
From: Peter Eisentraut
Date:
Subject: Re: Triggers on columns