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

Commit01accb3

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 parent18bc72e commit01accb3

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
@@ -1447,7 +1447,8 @@
14471447
<entry>
14481448
Encode binary data into a textual representation. Supported
14491449
formats are: <literal>base64</>, <literal>hex</>, <literal>escape</>.
1450-
<literal>escape</> merely outputs null bytes as <literal>\000</> and
1450+
<literal>escape</> converts zero bytes and high-bit-set bytes to
1451+
octal sequences (<literal>\</><replaceable>nnn</>) and
14511452
doubles backslashes.
14521453
</entry>
14531454
<entry><literal>encode(E'123\\000\\001', 'base64')</literal></entry>
@@ -2753,26 +2754,29 @@
27532754
<row>
27542755
<entry>
27552756
<literal><function>decode(<parameter>string</parameter> <type>text</type>,
2756-
<parameter>type</parameter> <type>text</type>)</function></literal>
2757+
<parameter>format</parameter> <type>text</type>)</function></literal>
27572758
</entry>
27582759
<entry><type>bytea</type></entry>
27592760
<entry>
2760-
Decode binarystring from <parameter>string</parameter> previously
2761-
encoded with <function>encode</>. Parameter type is same as in <function>encode</>.
2761+
Decode binarydata fromtextual representation in<parameter>string</>.
2762+
Options for <parameter>format</> are same as in <function>encode</>.
27622763
</entry>
27632764
<entry><literal>decode(E'123\\000456', 'escape')</literal></entry>
27642765
<entry><literal>123\000456</literal></entry>
27652766
</row>
27662767

27672768
<row>
27682769
<entry>
2769-
<literal><function>encode(<parameter>string</parameter> <type>bytea</type>,
2770-
<parameter>type</parameter> <type>text</type>)</function></literal>
2770+
<literal><function>encode(<parameter>data</parameter> <type>bytea</type>,
2771+
<parameter>format</parameter> <type>text</type>)</function></literal>
27712772
</entry>
27722773
<entry><type>text</type></entry>
27732774
<entry>
2774-
Encode binary string to <acronym>ASCII</acronym>-only representation. Supported
2775-
types are: <literal>base64</>, <literal>hex</>, <literal>escape</>.
2775+
Encode binary data into a textual representation. Supported
2776+
formats are: <literal>base64</>, <literal>hex</>, <literal>escape</>.
2777+
<literal>escape</> converts zero bytes and high-bit-set bytes to
2778+
octal sequences (<literal>\</><replaceable>nnn</>) and
2779+
doubles backslashes.
27762780
</entry>
27772781
<entry><literal>encode(E'123\\000456'::bytea, 'escape')</literal></entry>
27782782
<entry><literal>123\000456</literal></entry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp