Re: add function argument names to regex* functions.

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Dian Fay <di(at)nmfay(dot)com>, Jim Nasby <jim(dot)nasby(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Chapman Flack <jcflack(at)acm(dot)org>
Subject: Re: add function argument names to regex* functions.
Date: 2024-07-26 13:45:58
Message-ID: CACJufxGh4DAe+is2wDn5p_t2sAdZM7eWWm=ueAV0VOuyZ77j1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 19, 2024 at 5:48 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> The small issue is that table 9.10 offers this syntax diagram
> for regexp_replace:
>
> regexp_replace ( string text, pattern text, replacement text [, start integer ] [, flags text ] ) → text
>
> This implies that it's valid to write
>
> regexp_replace (string, pattern, replacement, start, flags)
>
> 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:
>
> regexp_replace ( string text, pattern text, replacement text [, start integer ] ) → text
> regexp_replace ( string text, pattern text, replacement text [, flags text ] ) → text
>

this problem is still there, after commit
580f8727ca93b7b9a2ce49746b9cdbcb0a2b4a7e.

<<
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?

see my posts:
https://postgr.es/m/CACJufxE5p4KhGyBUwCZCxhxdU%2BzJBXy2deX4u85SL%2Bkew4F7Cw%40mail.gmail.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-07-26 13:56:36 Re: Detailed release notes
Previous Message Fujii Masao 2024-07-26 13:44:41 Re: [Proposal] Add foreign-server health checks infrastructure