public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bruce Momjian <[email protected]>
To: Tom Lane <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Dave Stewart <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: Pg Docs <[email protected]>
Subject: Re: Conventions
Date: Wed, 26 Jan 2022 21:51:53 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<YfHZ9Ecpiy/[email protected]>
<[email protected]>
On Wed, Jan 26, 2022 at 09:33:58PM -0500, Tom Lane wrote:
> Bruce Momjian <[email protected]> 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 (<literal>[</literal> and
> + <literal>]</literal>) 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 <[email protected]> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
Attachments:
[text/x-diff] paren.diff (1.5K, 2-paren.diff)
download | inline 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 @@
<para>
The following conventions are used in the synopsis of a command:
brackets (<literal>[</literal> and <literal>]</literal>) indicate
- optional parts. (In the synopsis of a Tcl command, question marks
- (<literal>?</literal>) are used instead, as is usual in Tcl.) Braces
+ optional parts. Braces
(<literal>{</literal> and <literal>}</literal>) and vertical lines
(<literal>|</literal>) indicate that you must choose one
alternative. Dots (<literal>...</literal>) mean that the preceding element
- can be repeated.
+ can be repeated. All other symbols, including parentheses, should be
+ taken literally.
</para>
<para>
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;
<title>Database Access from PL/Tcl</title>
<para>
- 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:
<variablelist>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Conventions
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox