Re: Add small detail to RAISE statement descripton

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Igor Gnatyuk <ig953or(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Add small detail to RAISE statement descripton
Date: 2024-07-10 20:36:27
Message-ID: 2e89d99c849875e741fb399f91a4b234240cf3f6.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2024-07-12 05:52:24 Savepoints in plpgsql
Previous Message Thomas Munro 2024-07-04 23:22:00 Re: Joe Hellerstein's "Looking Back at Postgres" paper