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

Commit7bc2e68

Browse files
committed
Document encode(bytea, 'escape')'s behavior correctly.
I changed this in commitfd15dba, butmissed the fact that the SGML documentation of the function specifiedexactly what it did. Well, one of the two places where it's specifieddocumented that --- probably I looked at the other place and thoughtnothing needed to be done. Sync the two places where encode() anddecode() are described.
1 parent721478d commit7bc2e68

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,8 @@
15051505
<entry>
15061506
Encode binary data into a textual representation. Supported
15071507
formats are: <literal>base64</>, <literal>hex</>, <literal>escape</>.
1508-
<literal>escape</> merely outputs null bytes as <literal>\000</> and
1508+
<literal>escape</> converts zero bytes and high-bit-set bytes to
1509+
octal sequences (<literal>\</><replaceable>nnn</>) and
15091510
doubles backslashes.
15101511
</entry>
15111512
<entry><literal>encode(E'123\\000\\001', 'base64')</literal></entry>
@@ -3020,12 +3021,12 @@
30203021
<primary>decode</primary>
30213022
</indexterm>
30223023
<literal><function>decode(<parameter>string</parameter> <type>text</type>,
3023-
<parameter>type</parameter> <type>text</type>)</function></literal>
3024+
<parameter>format</parameter> <type>text</type>)</function></literal>
30243025
</entry>
30253026
<entry><type>bytea</type></entry>
30263027
<entry>
3027-
Decode binarystring from <parameter>string</parameter> previously
3028-
encoded with <function>encode</>. Parameter type is same as in <function>encode</>.
3028+
Decode binarydata fromtextual representation in<parameter>string</>.
3029+
Options for <parameter>format</> are same as in <function>encode</>.
30293030
</entry>
30303031
<entry><literal>decode(E'123\\000456', 'escape')</literal></entry>
30313032
<entry><literal>123\000456</literal></entry>
@@ -3036,13 +3037,16 @@
30363037
<indexterm>
30373038
<primary>encode</primary>
30383039
</indexterm>
3039-
<literal><function>encode(<parameter>string</parameter> <type>bytea</type>,
3040-
<parameter>type</parameter> <type>text</type>)</function></literal>
3040+
<literal><function>encode(<parameter>data</parameter> <type>bytea</type>,
3041+
<parameter>format</parameter> <type>text</type>)</function></literal>
30413042
</entry>
30423043
<entry><type>text</type></entry>
30433044
<entry>
3044-
Encode binary string to <acronym>ASCII</acronym>-only representation. Supported
3045-
types are: <literal>base64</>, <literal>hex</>, <literal>escape</>.
3045+
Encode binary data into a textual representation. Supported
3046+
formats are: <literal>base64</>, <literal>hex</>, <literal>escape</>.
3047+
<literal>escape</> converts zero bytes and high-bit-set bytes to
3048+
octal sequences (<literal>\</><replaceable>nnn</>) and
3049+
doubles backslashes.
30463050
</entry>
30473051
<entry><literal>encode(E'123\\000456'::bytea, 'escape')</literal></entry>
30483052
<entry><literal>123\000456</literal></entry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp