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 1nCutJ-00070w-OZ for pgsql-docs@arkaria.postgresql.org; Thu, 27 Jan 2022 02:52:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCutH-0000ND-Vo for pgsql-docs@arkaria.postgresql.org; Thu, 27 Jan 2022 02:52:03 +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 1nCutH-0000Mq-Ov for pgsql-docs@lists.postgresql.org; Thu, 27 Jan 2022 02:52:03 +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 1nCutD-0008MS-7L for pgsql-docs@lists.postgresql.org; Thu, 27 Jan 2022 02:52:01 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nCut7-00A5vu-OH; Wed, 26 Jan 2022 21:51:53 -0500 Date: Wed, 26 Jan 2022 21:51:53 -0500 From: Bruce Momjian To: Tom Lane Cc: Alvaro Herrera , Dave Stewart , "David G. Johnston" , Pg Docs Subject: Re: Conventions Message-ID: References: <202201261701.rzej4dlxqyts@alvherre.pgsql> <2517650.1643250838@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1AtuOmvMQTZqDRm7" Content-Disposition: inline In-Reply-To: <2517650.1643250838@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --1AtuOmvMQTZqDRm7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 26, 2022 at 09:33:58PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > OK, updated patch attached. I don't think we even show TCL syntax > > anywhere anymore, so I removed that text, rather than moving it. > > I really don't care for this phrasing at all: > > - the body of a PL/Tcl function: > + the body of a PL/Tcl function (brackets ([ and > + ]) are represented here as question marks): > > It's unclear whether you mean actual brackets or metasyntactic brackets; > somebody who hasn't completely internalized the notion of brackets as > indicating optional elements would be particularly likely to > misunderstand. > > I'd also suggest that wedging this into a parenthetic remark between a > sentence and the example the sentence is talking about is awkward. > > I'd suggest a separate para at some point before the first usage, > along the lines of > > In this section, we follow the usual Tcl convention of using question > marks, rather than brackets, to indicate an optional element in a > syntax synopsis. Oh, then I didn't understand it either. I know Tcl uses brackets for stuff so I thought there was some weird syntax that represented brackets as something else. Anyway, updated patch attached. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion. --1AtuOmvMQTZqDRm7 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="paren.diff" diff --git a/doc/src/sgml/notation.sgml b/doc/src/sgml/notation.sgml index bd1e8f629a..c3798d5f1b 100644 --- a/doc/src/sgml/notation.sgml +++ b/doc/src/sgml/notation.sgml @@ -6,12 +6,12 @@ The following conventions are used in the synopsis of a command: brackets ([ and ]) indicate - optional parts. (In the synopsis of a Tcl command, question marks - (?) are used instead, as is usual in Tcl.) Braces + optional parts. Braces ({ and }) and vertical lines (|) indicate that you must choose one alternative. Dots (...) mean that the preceding element - can be repeated. + can be repeated. All other symbols, including parentheses, should be + taken literally. diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index 1759fc4498..9839e375ad 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -320,8 +320,10 @@ $$ LANGUAGE pltcl; Database Access from PL/Tcl - The following commands are available to access the database from - the body of a PL/Tcl function: + In this section, we follow the usual Tcl convention of using question + marks, rather than brackets, to indicate an optional element in a + syntax synopsis. The following commands are available to access + the database from the body of a PL/Tcl function: --1AtuOmvMQTZqDRm7--