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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Roger Leigh <rleigh@codelibre.net>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>, Peter Eisentraut <peter_e@gmx.net>, Alvaro Herrera <alvherre@commandprompt.com>, Roger Leigh <rleigh@debian.org>, Andrew Dunstan <andrew@dunslane.net>, Robert Haas <robertmhaas@gmail.com>, Selena Deckelmann <selenamarie@gmail.com>, pgsql-hackers@postgresql.org, "Brad T. Sliger" <brad@sliger.org>
Date: 2009-10-13T21:08:20Z
Lists: pgsql-hackers
Roger Leigh <rleigh@codelibre.net> writes:
> The attached updated patch renames all user-visible uses of
> "utf8" to "unicode".  It also updates the documentation
> regarding "locale" to "psql client character set encoding"
> so the docs now match the code exactly.

Applied with light editorialization.  The main non-cosmetic change
I made was to postpone selection of default line_style until runtime
(see get_line_style() in the committed patch).  The original coding
required knowledge of the line_style default rule not only in three
different places in psql, but in every other place using print.c,
such as createlang/droplang -l (which dumped core with the patch as
submitted).  I changed it so that leaving line_style NULL implies
the default encoding-driven behavior, so that we don't need to touch
any of the callers.

			regards, tom lane