update substring pattern matching syntax

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: update substring pattern matching syntax
Date: 2020-06-19 09:42:14
Message-ID: a15db31c-d0f8-8ce0-9039-578a31758adb@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
0001-Clean-up-grammar-a-bit.patch text/plain 4.6 KB
0002-Add-current-substring-regular-expression-syntax.patch text/plain 10.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-06-19 09:46:53 Re: snowball ASCII stemmer configuration
Previous Message movead.li@highgo.ca 2020-06-19 09:03:20 Re: Global snapshots