From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add current substring regular expression syntax
Date: Mon, 29 Jun 2020 09:58:03 +0000
Message-ID: <E1jpqY7-0006m7-8t@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/78c887679d7632c1211f85eb95723f3226bf1b46
Modified Files
--------------
contrib/citext/expected/citext.out | 2 +-
contrib/citext/expected/citext_1.out | 2 +-
contrib/citext/sql/citext.sql | 2 +-
doc/src/sgml/func.sgml | 20 ++++++++++++++-----
src/backend/catalog/information_schema.sql | 2 +-
src/backend/parser/gram.y | 26 ++++++++++++++++++++++++-
src/test/regress/expected/strings.out | 31 ++++++++++++++++++------------
src/test/regress/sql/strings.sql | 26 +++++++++++++------------
8 files changed, 77 insertions(+), 34 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Add current substring regular expression syntax
In-Reply-To: <E1jpqY7-0006m7-8t@gemulon.postgresql.org>
References: <E1jpqY7-0006m7-8t@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox