Skip to content

Commit 87d5c22

Browse files
committed
Clean up description of 9.0's incompatible changes in SIMILAR TO and
SQL-style substring().
1 parent ce36151 commit 87d5c22

File tree

1 file changed

+21
-34
lines changed

1 file changed

+21
-34
lines changed

doc/src/sgml/release-9.0.sgml

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/release-9.0.sgml,v 2.14 2010/04/03 07:22:55 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/release-9.0.sgml,v 2.15 2010/04/05 02:46:42 tgl Exp $ -->
22

33

44
<sect1 id="release-9-0">
@@ -50,7 +50,7 @@
5050
defaulted to off for many years (Tom Lane)
5151
</para>
5252
</listitem>
53-
53+
5454
<listitem>
5555
<para>
5656
Remove server variable <varname>regex_flavor</>, which
@@ -59,9 +59,9 @@
5959
(e.g. Perl-regex compatible) for many years (Tom Lane)
6060
</para>
6161
</listitem>
62-
62+
6363
</itemizedlist>
64-
64+
6565
</sect3>
6666

6767
<sect3>
@@ -97,43 +97,30 @@
9797

9898
<listitem>
9999
<para>
100-
Fix <link linkend="functions-similarto-regexp"><literal>SIMILAR
101-
TO</></link> to match the SQL standard-specified behavior
102-
by processing <literal>?</> and <literal>{}</> the same way
103-
they are processed in regular expressions (Tom Lane)
104-
</para>
105-
</listitem>
106-
107-
<listitem>
108-
<para>
109-
Properly treat <literal>^</> and <literal>$</> as literals in
110-
<literal>SIMILAR TO</> patterns, to match the SQL standard (Tom Lane)
111-
</para>
112-
113-
<para>
114-
Previously these were treated using regular expression syntax. This
115-
change breaks backward compatibility. This also affects
116-
<function>substring()</>'s interpretation of regular expressions.
117-
</para>
118-
</listitem>
119-
120-
<listitem>
121-
<para>
122-
Process parentheses as literals in <literal>SIMILAR TO</> expressions;
123-
also make character class handling more standards-compliant (Tom Lane)
100+
Improve standards compliance of <link
101+
linkend="functions-similarto-regexp"><literal>SIMILAR TO</></link>
102+
patterns and SQL-style <function>substring()</> patterns (Tom Lane)
124103
</para>
125104

126105
<para>
127-
This also affects <function>substring()</>'s handling of regular
128-
expressions.
106+
This includes treating <literal>?</> and <literal>{...}</> as
107+
pattern metacharacters, while they were simple literal characters
108+
before; that corresponds to new features added in SQL:2008.
109+
Also, <literal>^</> and <literal>$</> are now treated as simple
110+
literal characters; formerly they were treated as metacharacters,
111+
as if the pattern were following POSIX rather than SQL rules.
112+
Also, in SQL-standard <function>substring()</>, use of parentheses
113+
for nesting no longer interferes with capturing of a substring.
114+
Also, processing of bracket expressions (character classes) is
115+
now more standards-compliant.
129116
</para>
130117
</listitem>
131118

132119
<listitem>
133120
<para>
134-
Do not allow <link
135-
linkend="functions-string-sql"><function>substring()</></link>
136-
to have a negative third length, per the SQL standard (Tom Lane)
121+
Reject negative length values in 3-parameter <link
122+
linkend="functions-string-sql"><function>substring()</></link>
123+
for bit strings, per the SQL standard (Tom Lane)
137124
</para>
138125
</listitem>
139126

@@ -1392,7 +1379,7 @@
13921379

13931380
<listitem>
13941381
<para>
1395-
Install server-side language PL/pgSQL by default (Bruce Momjian)
1382+
Install server-side language PL/pgSQL by default (Bruce Momjian)
13961383
</para>
13971384
</listitem>
13981385

0 commit comments

Comments
 (0)