In the 9.0devel release notes

  http://developer.postgresql.org/pgdocs/postgres/release-9-0.html

under

  E.1.2.3. String Handling

three changes are mentioned, and for the first two changes it is said that 
substring() is "affected":

------------8<------------
1
  Properly treat ^ and $ as literals in SIMILAR TO patterns, to match the SQL 
standard (Tom Lane)
Previously these were treated using regular expression syntax. This change 
breaks backward
compatibility. This also affects substring()'s interpretation of regular 
expressions.

2
  Process parentheses as literals in SIMILAR TO expressions; also make 
character class handling
more standards-compliant (Tom Lane)
  This also affects substring()'s handling of regular expressions.

3
   Do not allow substring()  to have a negative third length, per the SQL 
standard (Tom Lane)
------------8<------------

In 9.0devel cvs, I can find & affirm the SIMILAR TO changes, but I cannot find 
any changes to
substring() (other than the one under point 3.)


# select current_setting('server_version_num');
 current_setting
-----------------
 90000

# select substring('The quick brown fox', E'^The (quick) brown');
 substring
-----------
 quick
(1 row)

This shows that both  ^ and parentheses are regex-interpreted, and not 
literally as the
release-note text would have one believe.

Perhaps those mentions of substring-change under point 1 and 2 can be removed?


thanks,

Erik Rijkers



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to