@@ -3368,8 +3368,8 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
33683368
33693369 <para>
33703370 <function>LIKE</function> pattern matching always covers the entire
3371- string. Therefore, to match a sequence anywhere within a string, the
3372- pattern must start and end with a percent sign.
3371+ string. Therefore, if it's desired to match a sequence anywhere within
3372+ a string, the pattern must start and end with a percent sign.
33733373 </para>
33743374
33753375 <para>
@@ -3382,17 +3382,13 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
33823382 character itself, write two escape characters.
33833383 </para>
33843384
3385- <para>
3386- Note that the backslash already has a special meaning in string literals,
3387- so to write a pattern constant that contains a backslash you must write two
3388- backslashes in an SQL statement (assuming escape string syntax is used, see
3389- <xref linkend="sql-syntax-strings">). Thus, writing a pattern that
3390- actually matches a literal backslash means writing four backslashes in the
3391- statement. You can avoid this by selecting a different escape character
3392- with <literal>ESCAPE</literal>; then a backslash is not special to
3393- <function>LIKE</function> anymore. (But backslash is still special to the
3394- string literal parser, so you still need two of them to match a backslash.)
3395- </para>
3385+ <note>
3386+ <para>
3387+ If you have <xref linkend="guc-standard-conforming-strings"> turned off,
3388+ any backslashes you write in literal string constants will need to be
3389+ doubled. See <xref linkend="sql-syntax-strings"> for more information.
3390+ </para>
3391+ </note>
33963392
33973393 <para>
33983394 It's also possible to select no escape character by writing
@@ -3720,8 +3716,7 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
37203716 inserted, and it can contain <literal>\&</> to indicate that the
37213717 substring matching the entire pattern should be inserted. Write
37223718 <literal>\\</> if you need to put a literal backslash in the replacement
3723- text. (As always, remember to double backslashes written in literal
3724- constant strings, assuming escape string syntax is used.)
3719+ text.
37253720 The <replaceable>flags</> parameter is an optional text
37263721 string containing zero or more single-letter flags that change the
37273722 function's behavior. Flag <literal>i</> specifies case-insensitive
@@ -4031,16 +4026,14 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo;
40314026 </table>
40324027
40334028 <para>
4034- An RE cannot end with <literal>\</>.
4029+ An RE cannot end with a backslash ( <literal>\</>) .
40354030 </para>
40364031
40374032 <note>
40384033 <para>
4039- Remember that the backslash (<literal>\</literal>) already has a special
4040- meaning in <productname>PostgreSQL</> string literals.
4041- To write a pattern constant that contains a backslash,
4042- you must write two backslashes in the statement, assuming escape
4043- string syntax is used (see <xref linkend="sql-syntax-strings">).
4034+ If you have <xref linkend="guc-standard-conforming-strings"> turned off,
4035+ any backslashes you write in literal string constants will need to be
4036+ doubled. See <xref linkend="sql-syntax-strings"> for more information.
40444037 </para>
40454038 </note>
40464039
@@ -5541,10 +5534,8 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
55415534 <listitem>
55425535 <para>
55435536 If you want to have a double quote in the output you must
5544- precede it with a backslash, for example <literal>E'\\"YYYY
5545- Month\\"'</literal>. <!-- "" font-lock sanity :-) -->
5546- (Two backslashes are necessary because the backslash
5547- has special meaning when using the escape string syntax.)
5537+ precede it with a backslash, for example <literal>'\"YYYY
5538+ Month\"'</literal>. <!-- "" font-lock sanity :-) -->
55485539 </para>
55495540 </listitem>
55505541
0 commit comments