From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | troy(at)frericks(dot)us, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Manua correction |
Date: | 2021-07-20 20:06:17 |
Message-ID: | 20210720200617.GA27025@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Tue, Jul 20, 2021 at 11:03:09AM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I really don't understand the use of "(s)" except in place where we are
> > really trying to point out the idea of one or multiple, and I don't see
> > that being significant in these cases --- can you clarify?
>
> See the example given for regexp_match:
>
> regression=# select regexp_match('foobarbequebaz', '(bar)(beque)');
> regexp_match
> --------------
> {bar,beque}
> (1 row)
>
> There's more than one parenthesized subpattern, so you get more than
> one substring in the result. So I think that change is flat out
> wrong.
>
> The places where you changed "substring(s)" to "substrings" are maybe
> not flat wrong, but I don't think they're improving the text either.
> IIRC, in most of them you get one match if you didn't use the 'g'
> flag, but possibly multiple matches if you did, and the "substring(s)"
> wording is meant to allude to that without taking the space to spell
> it out explicitly.
I see what you mean --- there can be multiple capture groups, and
multiple match processing if 'g' is used. I think the text using "(s)"
is too complex, so I spelled out the use 'g' and clarified the case of
multiple groups in a single regex.
Updated patch attached, and I used a larger line context around the
changes to clarify what was being modified.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
Attachment | Content-Type | Size |
---|---|---|
substring.diff.gz | application/gzip | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2021-07-20 23:37:13 | Re: Minor language edits for PostgreSQL 14 Release Notes |
Previous Message | Tom Lane | 2021-07-20 15:03:09 | Re: Manua correction |