Release Notes 9.0: substring() changes?

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Release Notes 9.0: substring() changes?
Дата
Msg-id 6120e791a2d6fdc80feb1a8d2ea390ae.squirrel@webmail.xs4all.nl
обсуждение исходный текст
Ответы Re: Release Notes 9.0: substring() changes?
Список 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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Interesting near-bug in shared-dependency management
Следующее
От: Tom Lane
Дата:
Сообщение: Re: message clarifications