Re: Undocumented optionality of handler_statements - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Undocumented optionality of handler_statements
Date
Msg-id CAKFQuwajwUO3aL6AdvSo66FKyE4UXhtAfOk2EwWAoSGj2=hpQg@mail.gmail.com
Whole thread Raw
In response to Undocumented optionality of handler_statements  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Wednesday, October 16, 2024, Bruce Momjian <bruce@momjian.us> wrote:
On Wed, Sep 11, 2024 at 03:37:17PM +0900, Michael Paquier wrote:
> On Tue, Jul 23, 2024 at 01:25:39PM +0200, Philipp Salvisberg wrote:
> > read "optional" as "mandatory".
>
> They're optional, like in empty being optional.  If not specified, the
> block goes to its END.
>
> > Therefore, I suggest to change this example by adding a NULL
> > statement as in other examples. This change would make the
> > documentation consistent and handle the optionality of
> > handler_statements as an implementation detail. I created a patch
> > for plpgsql.sgml based on the master branch, adding a NULL statement
> > in empty exception handlers (see attached file
> > doc_patch_using_null_stmt_instead_of_empty_exception_handler_v1.diff).
>
> These examples have been around for 20 years with, and I think that it
> is helpful to show this pattern as well.  So if I were to do something
> about that, I would suggest the attached.

Do we want to apply this patch?  I added a comma to the text, attached.

-1 for me.

This establishes a policy change for documenting an empty set of statements without touching all places that would require changing to conform to the new policy.

I’m weakly against changing the policy at this point; if we do the patch needs to touch all relevant places.

David J.

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: A minor bug in doc. Hovering over heading shows # besides it.
Next
From: David Rowley
Date:
Subject: Re: A minor bug in doc. Hovering over heading shows # besides it.