1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

psql: Support zero byte field and record separators

Add new psql settings and command-line options to support setting the
field and record separators for unaligned output to a zero byte, for
easier interfacing with other shell tools.

reviewed by Abhijit Menon-Sen
This commit is contained in:
Peter Eisentraut
2012-02-09 20:15:48 +02:00
parent dd7c84185c
commit 169c8a9112
6 changed files with 154 additions and 46 deletions

View File

@ -482,6 +482,27 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><option>-z</option></term>
<term><option>--field-separator-zero</option></term>
<listitem>
<para>
Set the field separator for unaligned output to a zero byte.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-0</option></term>
<term><option>--record-separator-zero</option></term>
<listitem>
<para>
Set the record separator for unaligned output to a zero byte. This is
useful for interfacing, for example, with <literal>xargs -0</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-1</option></term>
<term><option>--single-transaction</option></term>
@ -1908,6 +1929,16 @@ lo_import 152801
</listitem>
</varlistentry>
<varlistentry>
<term><literal>fieldsep_zero</literal></term>
<listitem>
<para>
Sets the field separator to use in unaligned output format to a zero
byte.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>footer</literal></term>
<listitem>
@ -2077,6 +2108,16 @@ lo_import 152801
</listitem>
</varlistentry>
<varlistentry>
<term><literal>recordsep_zero</literal></term>
<listitem>
<para>
Sets the record separator to use in unaligned output format to a zero
byte.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>tableattr</literal> (or <literal>T</literal>)</term>
<listitem>