Re: Add small detail to RAISE statement descripton

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Igor Gnatyuk <ig953or@gmail.com>, jian he <jian.universality@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Date: 2024-07-10T20:36:27Z
Lists: pgsql-docs
On Wed, 2024-05-22 at 18:34 +0300, Igor Gnatyuk wrote:
> fix_doc_raise_v3-bios.patch. Please check it out.

I think the patch is fine.

> +   <para>
> +    <replaceable class="parameter">condition_name</replaceable> and
> +    <replaceable class="parameter">sqlstate</replaceable> specify
> +    error condition name and the five-character SQLSTATE code respectively.
> +    See <xref linkend="errcodes-appendix"/> for more information.
> +   </para>

There should be a comma before "respectively".

>      You can attach additional information to the error report by writing
>      <literal>USING</literal> followed by <replaceable
>      class="parameter">option</replaceable> = <replaceable
> -    class="parameter">expression</replaceable> items.  Each
> +    class="parameter">expression</replaceable> or
> +    <replaceable class="parameter">option</replaceable> :=
> +    <replaceable class="parameter">expression</replaceable>
> +    items, where
>      <replaceable class="parameter">expression</replaceable> can be any
>      string-valued expression.

I think that is unnecessarily verbose.  The original wording was fine;
everybody can see from the syntax diagram that you can also use :=

But I won't fight over it.

> +    In the <command>RAISE</command> command syntax with
> +    <replaceable class="parameter">condition_name</replaceable> or
> +    <replaceable class="parameter">sqlstate</replaceable> you can
> +    additionally use the <literal>USING</literal> clause too.
> +    A variation of the example above:

I think that the final sentence should be more complete.
Suggestions:

  Here is a variation of the above example:

  A variation of the above example is:

Yours,
Laurenz Albe



Commits

  1. Doc: improve description of plpgsql's RAISE command.