public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: [email protected]
To: Pg Docs <[email protected]>
Subject: Re: Incorrect Syntax in Function Syntax diagram
Date: Wed, 23 Jun 2021 08:16:49 -0700
Message-ID: <CAKFQuwaGV+47J9yqoi16Ke7jkzKALO1V=VXrjMPwhMe9tL580w@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Wed, Jun 23, 2021 at 6:31 AM PG Doc comments form <[email protected]>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/sql-createfunction.html
> Description:
>
> | IMMUTABLE | STABLE | VOLATILE | [ NOT ] LEAKPROOF
>
> [ NOT ] LEAKPROOF  is accepting separately ,
> So why you written [ NOT ] LEAKPROOF with | IMMUTABLE | STABLE | VOLATILE
> |
>
>
The commit message doesn't say - but I can see how from a technical
perspective that the claim that something is immutable is considered
similar to a claim that something has no side effects, thus there is a
connection.  As noted below, the fact that the first three are mutually
exclusive while leakproof is not is convincing enough a reason to list
leakproof separately.

Please separate the [ NOT ] LEAKPROOF from the OR list
>

I would agree, and would add that I wonder whether the syntax for the three
mutually exclusive options should be shown as such instead of having to
read that in the description notes.  Does writing < | { IMMUTABLE | STABLE
| VOLATILE } > work?

Note: Your documentation must be correct
>

Is that so? It is a good thing then that it is presently correct and that
this is just a readability suggestion.  The presence of them all on the
same line does not by itself imply any kind of relationship in the actual
grammar.

David J.


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]
  Subject: Re: Incorrect Syntax in Function Syntax diagram
  In-Reply-To: <CAKFQuwaGV+47J9yqoi16Ke7jkzKALO1V=VXrjMPwhMe9tL580w@mail.gmail.com>

* 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