Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9a79c2

Browse files
committed
doc: \123 and \x12 escapes in COPY are in database encoding.
The backslash sequences, including \123 and \x12 escapes, are interpretedafter encoding conversion. The docs failed to mention that.Backpatch to all supported versions.Reported-by: Andreas GrobDiscussion:https://www.postgresql.org/message-id/17142-9181542ca1df75ab%40postgresql.org
1 parent6f8127b commite9a79c2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎doc/src/sgml/ref/copy.sgml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,12 +636,12 @@ COPY <replaceable class="parameter">count</replaceable>
636636
<row>
637637
<entry><literal>\</literal><replaceable>digits</replaceable></entry>
638638
<entry>Backslash followed by one to three octal digits specifies
639-
thecharacter with that numeric code</entry>
639+
thebyte with that numeric code</entry>
640640
</row>
641641
<row>
642642
<entry><literal>\x</literal><replaceable>digits</replaceable></entry>
643643
<entry>Backslash <literal>x</literal> followed by one or two hex digits specifies
644-
thecharacter with that numeric code</entry>
644+
thebyte with that numeric code</entry>
645645
</row>
646646
</tbody>
647647
</tgroup>
@@ -673,6 +673,12 @@ COPY <replaceable class="parameter">count</replaceable>
673673
or vice versa).
674674
</para>
675675

676+
<para>
677+
All backslash sequences are interpreted after encoding conversion.
678+
The bytes specified with the octal and hex-digit backslash sequences must
679+
form valid characters in the database encoding.
680+
</para>
681+
676682
<para>
677683
<command>COPY TO</command> will terminate each row with a Unix-style
678684
newline (<quote><literal>\n</literal></quote>). Servers running on Microsoft Windows instead

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp