Re: add function argument names to regex* functions.
Chapman Flack <jcflack@acm.org>
From: Chapman Flack <jcflack@acm.org>
To: jian he <jian.universality@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>, Dian Fay <di@nmfay.com>,
Jim Nasby <jim.nasby@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-07-15T14:46:06Z
Lists: pgsql-hackers
On 07/15/24 08:02, jian he wrote:
> also address Chapman Flack point:
> correct me if i am wrong, but i don't think the ISO standard mandates
> function argument names.
> So we can choose the best function argument name for our purpose?
Ah, I may have mistaken which functions the patch meant to apply to.
These being the non-ISO regexp_* functions using POSIX expressions,
the ISO standard indeed says nothing about them.
In the ISO standard *_regex "functions", there are not really "function
argument names" mandated, because, like so many things in ISO SQL, they
have their own special syntax instead of being generic function calls:
TRANSLATE_REGEX('a|e|i|o|u' FLAG 'i' IN 'A PostgreSQL function'
WITH 'X' FROM 1 OCCURRENCE 3);
Any choice to use similar argument names in the regexp_* functions would
be a matter of consistency with the analogous ISO functions, not anything
mandated.
Regards,
-Chap
Commits
-
Doc: fix text's description of regexp_replace's arguments.
- da4017a694de 18.0 landed
-
Add argument names to the regexp_XXX functions.
- 580f8727ca93 18.0 landed
-
Add assorted new regexp_xxx SQL functions.
- 642433707358 15.0 cited