git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: aafefb4) | patch
Add current substring regular expression syntax
2020年6月29日 09:04:42 +0000 (11:04 +0200)
2020年6月29日 09:05:00 +0000 (11:05 +0200)
commit 78c887679d7632c1211f85eb95723f3226bf1b46
Add current substring regular expression syntax

SQL:1999 had syntax

SUBSTRING(text FROM pattern FOR escapechar)

but this was replaced in SQL:2003 by the more clear

SUBSTRING(text SIMILAR pattern ESCAPE escapechar)

but this was never implemented in PostgreSQL. This patch adds that
new syntax as an alternative in the parser, and updates documentation
and tests to indicate that this is the preferred alternative now.

Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Reviewed-by: Vik Fearing <vik@postgresfriends.org>
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
Discussion: https://www.postgresql.org/message-id/flat/a15db31c-d0f8-8ce0-9039-578a31758adb%402ndquadrant.com
contrib/citext/expected/citext.out diff | blob | blame | history
contrib/citext/expected/citext_1.out diff | blob | blame | history
contrib/citext/sql/citext.sql diff | blob | blame | history
doc/src/sgml/func.sgml diff | blob | blame | history
src/backend/catalog/information_schema.sql diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/test/regress/expected/strings.out diff | blob | blame | history
src/test/regress/sql/strings.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /