update substring pattern matching syntax
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-06-19T09:42:14Z
Lists: pgsql-hackers
Attachments
- 0001-Clean-up-grammar-a-bit.patch (text/plain) patch 0001
- 0002-Add-current-substring-regular-expression-syntax.patch (text/plain) patch 0002
At
<https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard#Obsolete_syntax_for_substring.28.29>
it is described that the substring pattern matching syntax in PostgreSQL
does not conform to the current standard. PostgreSQL implements
SUBSTRING(text FROM pattern FOR escapechar)
whereas the current standard says
SUBSTRING(text SIMILAR pattern ESCAPE escapechar)
The former was in SQL99, but the latter has been there since SQL:2003.
It's pretty easy to implement the second form also, so here is a patch
that does that.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Add current substring regular expression syntax
- 78c887679d76 14.0 landed
-
Clean up grammar a bit
- aafefb4dcbf7 14.0 landed