Re: add function argument names to regex* functions. - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: add function argument names to regex* functions.
Date
Msg-id 6695362E.4010202@acm.org
Whole thread Raw
In response to Re: add function argument names to regex* functions.  (jian he <jian.universality@gmail.com>)
Responses Re: add function argument names to regex* functions.
List 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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Showing applied extended statistics in explain Part 2
Next
From: Chapman Flack
Date:
Subject: Re: add function argument names to regex* functions.