Commit 93d6a8aa authored by Bruce Momjian's avatar Bruce Momjian

> pgsql-bugs@postgresql.org wrote:

>  > David Clark (dclarknospam@opsi.co.za) reports a bug with a severity
>  > Table 3-7 SQL Literal escaped octets shows the input escape
>  > representation for a single quote as '\\'' , but the third paragraph
>  > below table 3-8 SQL Output Escaped Octets says that the single quote
>  > must be input as '\''
>
> Nice catch. '\'' is correct as shown in the example in Table 3-7.
>
>  >
>  > Also in the same paragraph mentioned above it says input for the
>  > single quote must be '\'' (or '\\134') shouldn't this be (or '\\047')
>
> Also a bug. Should be '\\047', as you pointed out.
>

Here's a patch to fix the binary string doc errors.

Joe Conway
parent 3c7798f0
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.95 2002/07/16 04:45:59 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.96 2002/07/16 17:05:46 momjian Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
...@@ -1021,7 +1021,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -1021,7 +1021,7 @@ SELECT b, char_length(b) FROM test2;
<row> <row>
<entry> <literal> 39 </literal> </entry> <entry> <literal> 39 </literal> </entry>
<entry> single quote </entry> <entry> single quote </entry>
<entry> <literal> '\\'' or '\\047' </literal> </entry> <entry> <literal> '\'' or '\\047' </literal> </entry>
<entry> <literal> select '\''::bytea; </literal></entry> <entry> <literal> select '\''::bytea; </literal></entry>
<entry> <literal> ' </literal></entry> <entry> <literal> ' </literal></entry>
</row> </row>
...@@ -1126,7 +1126,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -1126,7 +1126,7 @@ SELECT b, char_length(b) FROM test2;
<para> <para>
A single quote is a bit different in that it must be input as A single quote is a bit different in that it must be input as
<literal>'\''</literal> (or <literal>'\\134'</literal>), <literal>'\''</literal> (or <literal>'\\047'</literal>),
<emphasis>not</emphasis> as <literal>'\\''</literal>. This is because, <emphasis>not</emphasis> as <literal>'\\''</literal>. This is because,
while the literal parser interprets the single quote as a special while the literal parser interprets the single quote as a special
character, and will consume the single backslash, the character, and will consume the single backslash, the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment