Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5rHM-0004g3-T4 for pgsql-docs@arkaria.postgresql.org; Tue, 20 Jul 2021 15:03:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5rHK-0000Xh-1h for pgsql-docs@arkaria.postgresql.org; Tue, 20 Jul 2021 15:03:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5rHJ-0000WF-Ru for pgsql-docs@lists.postgresql.org; Tue, 20 Jul 2021 15:03:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5rHF-0005RU-0f for pgsql-docs@lists.postgresql.org; Tue, 20 Jul 2021 15:03:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16KF395I400209; Tue, 20 Jul 2021 11:03:10 -0400 From: Tom Lane To: Bruce Momjian cc: troy@frericks.us, pgsql-docs@lists.postgresql.org Subject: Re: Manua correction In-reply-to: <20210719142355.GA12687@momjian.us> References: <162614304115.701.2392941350859387646@wrigleys.postgresql.org> <20210715213623.GC14027@momjian.us> <3701102.1626405158@sss.pgh.pa.us> <20210719142355.GA12687@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Mon, 19 Jul 2021 10:23:55 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <400207.1626793389.1@sss.pgh.pa.us> Date: Tue, 20 Jul 2021 11:03:09 -0400 Message-ID: <400208.1626793389@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian 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