mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-05 17:09:20 +02:00
doc: \123 and \x12 escapes in COPY are in database encoding.
The backslash sequences, including \123 and \x12 escapes, are interpreted after encoding conversion. The docs failed to mention that. Backpatch to all supported versions. Reported-by: Andreas Grob Discussion: https://www.postgresql.org/message-id/17142-9181542ca1df75ab%40postgresql.org
This commit is contained in:
parent
d392e86fa9
commit
b889d6c719
@ -615,12 +615,12 @@ COPY <replaceable class="parameter">count</replaceable>
|
|||||||
<row>
|
<row>
|
||||||
<entry><literal>\</literal><replaceable>digits</replaceable></entry>
|
<entry><literal>\</literal><replaceable>digits</replaceable></entry>
|
||||||
<entry>Backslash followed by one to three octal digits specifies
|
<entry>Backslash followed by one to three octal digits specifies
|
||||||
the character with that numeric code</entry>
|
the byte with that numeric code</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>\x</literal><replaceable>digits</replaceable></entry>
|
<entry><literal>\x</literal><replaceable>digits</replaceable></entry>
|
||||||
<entry>Backslash <literal>x</literal> followed by one or two hex digits specifies
|
<entry>Backslash <literal>x</literal> followed by one or two hex digits specifies
|
||||||
the character with that numeric code</entry>
|
the byte with that numeric code</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
@ -652,6 +652,12 @@ COPY <replaceable class="parameter">count</replaceable>
|
|||||||
or vice versa).
|
or vice versa).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
All backslash sequences are interpreted after encoding conversion.
|
||||||
|
The bytes specified with the octal and hex-digit backslash sequences must
|
||||||
|
form valid characters in the database encoding.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>COPY TO</command> will terminate each row with a Unix-style
|
<command>COPY TO</command> will terminate each row with a Unix-style
|
||||||
newline (<quote><literal>\n</literal></quote>). Servers running on Microsoft Windows instead
|
newline (<quote><literal>\n</literal></quote>). Servers running on Microsoft Windows instead
|
||||||
|
Loading…
Reference in New Issue
Block a user