Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[] - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]
Date
Msg-id E4851E05-A9C9-4B5F-B809-8E020DE527F6@yesql.se
Whole thread Raw
In response to Re: Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]
List pgsql-hackers
> On 1 Sep 2021, at 16:02, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>>> On 9 Mar 2021, at 20:30, Joel Jacobson <joel@compiler.org> wrote:
>>> Attached is a patch implementing it this way.
>
>> This patch no longer applies, can you please submit a rebased version?

On a brief skim, this patch includes the doc stanza for regexp_replace which I
assume is a copy/pasteo.

+        TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starts”,
While “start_positions” is awfully verbose, just “starts” doesn’t really roll
off the tongue.  Perhaps “positions” would be more explanatory?

> Also, since 642433707 ("This patch adds new functions regexp_count(),
> regexp_instr(), regexp_like(), and regexp_substr(), and extends
> regexp_replace() with some new optional arguments") is already in,
> we need to think about how this interacts with that.  Do we even
> still need any more functionality in this area?  Should we try to
> align the APIs?

I can see value in a function like this one, and the API is AFAICT fairly
aligned with what I as a user would expect it to be given what we already have.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [PATCH] Support pg_ident mapping for LDAP
Next
From: Thomas Munro
Date:
Subject: stat() vs ERROR_DELETE_PENDING, round N + 1