Re: add function argument names to regex* functions.
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>, Dian Fay <di@nmfay.com>, Jim Nasby <jim.nasby@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Chapman Flack <jcflack@acm.org>
Date: 2024-07-27T00:56:00Z
Lists: pgsql-hackers
Attachments
- v1-0001-refactor-regexp_replace-syntax.patch (text/x-patch) patch v1-0001
On Fri, Jul 26, 2024 at 10:40 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> jian he <jian.universality@gmail.com> writes:
> > On Fri, Jul 26, 2024 at 10:17 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> 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.)
>
> > regexp_replace(string, pattern, replacement [, start [, N ]] [, flags ]).
>
> > can represent
>
> > regexp_replace(string, pattern, replacement , start, flags ) ?
>
> Hmm, yeah, you're right. I didn't want to write two separate
> synopses there, but maybe there's no choice.
>
we can get rid of:
(Notice that <replaceable>N</replaceable> cannot be specified
unless <replaceable>start</replaceable> is,
but <replaceable>flags</replaceable> can be given in any case.)
Now the output is
It has the syntax regexp_replace(string, pattern, replacement [, flags
]) and regexp_replace(string, pattern, replacement, start [, N [,
flags ]]).
I also decorated "[]" with "<optional>".
Commits
-
Doc: fix text's description of regexp_replace's arguments.
- da4017a694de 18.0 landed
-
Add argument names to the regexp_XXX functions.
- 580f8727ca93 18.0 landed
-
Add assorted new regexp_xxx SQL functions.
- 642433707358 15.0 cited