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

From David G. Johnston
Subject Re: add function argument names to regex* functions.
Date
Msg-id CAKFQuwYqvPwv=MPadVpH3oXb+uKYVAaaSW-3=banZqZ=cX4PsA@mail.gmail.com
Whole thread Raw
In response to Re: add function argument names to regex* functions.  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, May 15, 2024 at 12:07 PM Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, May 15, 2024 at 3:01 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
> I think this confusion goes to show that replacing N with count doesn't work.
>
> "replace_at" comes to mind as a better name.
I'd expect replace_at to be a
character position or something, not an occurrence count.


I'll amend the name to:  "replace_match"

I do now see that since the immediately preceding parameter, "start", deals with characters instead of matches that making it clear this parameter deals in matches in the name work.  The singular 'match' has all the same benefits as 'at' plus this point of clarity.


David J.

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: More performance improvements for pg_dump in binary upgrade mode
Next
From: Robert Haas
Date:
Subject: Re: add function argument names to regex* functions.