public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dian Fay <[email protected]>
To: jian he <[email protected]>
Cc: Jim Nasby <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: add function argument names to regex* functions.
Date: Mon, 08 Jan 2024 19:51:58 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxHTw22kOmmDBpubmju9bfFhonEekwf0s6LGvysbnWEg9Q@mail.gmail.com>
References: <CACJufxG3NFKKsh6x4fRLv8h3V-HvN4W5dA=zNKMxsNcDwOKang@mail.gmail.com>
<[email protected]>
<CACJufxHeyc34PMx6OnWb-xoaMtj1Yoax1rM+71zkwCynvmVwdg@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CACJufxHBx+AHGVJocDSD-PbX0z32vJR9eEUhB+vsJHbjwnXNcg@mail.gmail.com>
<[email protected]>
<CACJufxHTw22kOmmDBpubmju9bfFhonEekwf0s6LGvysbnWEg9Q@mail.gmail.com>
On Mon Jan 8, 2024 at 9:26 AM EST, jian he wrote:
> On Mon, Jan 8, 2024 at 8:44 AM Dian Fay <[email protected]> wrote:
> > The `regexp_replace` summary in table 9.10 is mismatched and still
> > specifies the first parameter name as `string` instead of `source`.
> > Since all the other functions use `string`, should `regexp_replace` do
> > the same or is this a case where an established "standard" diverges?
>
> got it. Thanks for pointing it out.
>
> in functions-matching.html
> if I change <replaceable>source</replaceable> to
> <replaceable>string</replaceable> then
> there are no markup "string" and markup "string", it's kind of
> slightly confusing.
>
> So does the following refactored description of regexp_replace make sense:
>
> The <replaceable>string</replaceable> is returned unchanged if
> there is no match to the <replaceable>pattern</replaceable>. If there is a
> match, the <replaceable>string</replaceable> is returned with the
> <replaceable>replacement</replaceable> string substituted for the matching
> substring. The <replaceable>replacement</replaceable> string can contain
> <literal>\</literal><replaceable>n</replaceable>, where
> <replaceable>n</replaceable> is 1
> through 9, to indicate that the source substring matching the
> <replaceable>n</replaceable>'th parenthesized subexpression of
> the pattern should be
> inserted, and it can contain <literal>\&</literal> to indicate that the
> substring matching the entire pattern should be inserted. Write
> <literal>\\</literal> if you need to put a literal backslash in
> the replacement
> text.
That change makes sense to me! I'll see about the section refactoring
after this lands.
view thread (16+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: add function argument names to regex* functions.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox