From: | "Erik Rijkers" <er(at)xs4all(dot)nl> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Release Notes 9.0: substring() changes? |
Date: | 2010-04-04 21:54:46 |
Message-ID: | 6120e791a2d6fdc80feb1a8d2ea390ae.squirrel@webmail.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-04-05 00:43:21 | Re: message clarifications |
Previous Message | Tom Lane | 2010-04-04 21:47:21 | Interesting near-bug in shared-dependency management |