Re: Manua correction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: troy(at)frericks(dot)us, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Manua correction
Date: 2021-07-20 15:03:09
Message-ID: 400208.1626793389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Thu, Jul 15, 2021 at 11:12:38PM -0400, Tom Lane wrote:
>> At least two of these changes are flat out wrong. The places
>> that explicitly mention "substring(s)" are not doing so because
>> we failed to think about what that meant.

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

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2021-07-20 20:06:17 Re: Manua correction
Previous Message Elena Indrupskaya 2021-07-20 12:58:00 Minor language edits for PostgreSQL 14 Release Notes