1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add "\pset linestyle ascii/unicode" option to psql, allowing our traditional

ASCII-art style of table output to be upgraded to use Unicode box drawing
characters if desired.  By default, psql will use the Unicode characters
whenever client_encoding is UTF8.

The patch forces linestyle=ascii in pg_regress usage, ensuring we don't
break the regression tests in Unicode locales.

Roger Leigh
This commit is contained in:
Tom Lane
2009-10-13 21:04:01 +00:00
parent b140711643
commit 42ec8ad628
8 changed files with 276 additions and 90 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.231 2009/10/08 16:34:00 alvherre Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.232 2009/10/13 21:04:01 tgl Exp $
PostgreSQL documentation
-->
@ -1760,6 +1760,39 @@ lo_import 152801
</listitem>
</varlistentry>
<varlistentry>
<term><literal>linestyle</literal></term>
<listitem>
<para>
Sets the border line drawing style to one
of <literal>ascii</literal> or <literal>unicode</literal>.
Unique abbreviations are allowed. (That would mean one
letter is enough.)
</para>
<para>
<quote>ASCII</quote> uses plain <acronym>ASCII</acronym> characters.
</para>
<para>
<quote>Unicode</quote> uses Unicode box-drawing characters.
</para>
<para>
When the selected output format is one that draws lines or boxes
around the data, this setting controls how the lines are drawn.
Plain <acronym>ASCII</acronym> characters work everywhere, but
Unicode characters look nicer on displays that recognize them.
</para>
<para>
If this option has not been set, the default behavior is to
use Unicode characters if the client character set encoding
is UTF-8, otherwise <acronym>ASCII</acronym> characters.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>expanded</literal> (or <literal>x</literal>)</term>
<listitem>