jian he <jian.universality@gmail.com> writes:
> On Fri, Jul 19, 2024 at 5:48 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> but it is not: we have no function matching that signature. I'm not
>> in a hurry to add one, either, for fear of ambiguity against the other
>> regexp_replace signature. I think this needs to be broken into two
>> syntax diagrams:
> this problem is still there, after commit
> 580f8727ca93b7b9a2ce49746b9cdbcb0a2b4a7e.
No, I believe I fixed it: the table now offers
regexp_replace ( string text, pattern text, replacement text [, flags text ] ) → text
regexp_replace ( string text, pattern text, replacement text, start integer [, N integer [, flags text ] ] ) → text
That's different from either of the solutions discussed in this
thread, but simpler.
> <<
> It has the syntax regexp_replace(string, pattern, replacement [, start
> [, N ]] [, flags ]). (Notice that N cannot be specified unless start
> is, but flags can be given in any case.)
> <<
> doc, the above part still needs change?
AFAICS, that one is correct, so I left it alone. (I didn't try to
merge the table's two entries into one like that, though.)
regards, tom lane