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 1m5w0c-00009e-B4 for pgsql-docs@arkaria.postgresql.org; Tue, 20 Jul 2021 20:06:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5w0Z-0004KB-NH for pgsql-docs@arkaria.postgresql.org; Tue, 20 Jul 2021 20:06:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5w0Z-0004K3-HC for pgsql-docs@lists.postgresql.org; Tue, 20 Jul 2021 20:06:27 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5w0S-0008MA-Rl for pgsql-docs@lists.postgresql.org; Tue, 20 Jul 2021 20:06:27 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1m5w0P-0002jH-Rm; Tue, 20 Jul 2021 16:06:17 -0400 Date: Tue, 20 Jul 2021 16:06:17 -0400 From: Bruce Momjian To: Tom Lane Cc: troy@frericks.us, pgsql-docs@lists.postgresql.org Subject: Re: Manua correction Message-ID: <20210720200617.GA27025@momjian.us> References: <162614304115.701.2392941350859387646@wrigleys.postgresql.org> <20210715213623.GC14027@momjian.us> <3701102.1626405158@sss.pgh.pa.us> <20210719142355.GA12687@momjian.us> <400208.1626793389@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <400208.1626793389@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 20, 2021 at 11:03:09AM -0400, Tom Lane wrote: > Bruce Momjian 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 https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion. --oyUTqETQ0mS9luUI Content-Type: application/gzip Content-Disposition: attachment; filename="substring.diff.gz" Content-Transfer-Encoding: base64 H4sICIwd92AAA3N1YnN0cmluZy5kaWZmAO1aa2/bNhT97l9BJA1kI37JjyRuNaNrkQEBkjZr MmBDWwS0RdvEZNEj6drO0P++S1IPOvFDftRrgaZIJVG6R5fkPUeXvPFpr4dKpT6VCFd81q0I Dr/9YVDpjcNuWZ2hzpIbORr6ZIoaXRfX/PNWo1suX7j1qus3G7UacqvVs0YjVyqVliLnTk9P l6O/fo1KteaZW3Qv0Kk5aSFo5GREsMw7t32niBoF5HEixzz8goMxad/2zT+vYrfmUPTjkVDy GeIsIL8cqVc9SNwJyINuPmp7I8yxfVfQfogBhxylGMjT/ZaED61G5I04HWI+a4+YoJKy0KvE LZZpZZGtp96lTCzbpAnlkXZrSMCqLcYdITkNoYNpI/LkbETaEoC9ij5F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