Re: Add small detail to RAISE statement descripton

From: Igor Gnatyuk <ig953or(at)gmail(dot)com>
To: 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-05-22 08:18:14
Message-ID: CAEu6iLsL+Gw79f-8ZdU-GPnHXgSeEcPCk5qu9BcE1FRfO8Qbgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi.

Thanks for the comments. I fixed my mistakes by specifying sqlcode
instead of sqlstate and changed the phrase
with an explicit listing of options in USING. In addition, I moved the
paragraph with it below.
Please check out the new patch version in the attachment.

Regards, Igor Gnatyuk

вс, 19 мая 2024 г. в 11:43, jian he <jian(dot)universality(at)gmail(dot)com>:
>
> On Fri, May 17, 2024 at 4:39 PM Igor Gnatyuk <ig953or(at)gmail(dot)com> wrote:
> >
> > Hi.
> >
> > Thank you for your letter. I tried to take your comments into account:
> > I added explanations to the condition_name, sqlstate options and
> > slightly changed
> > the explanations for USING. Attached you will find new patch version.
> > Thank you for your help.
> >
> > Ragards, Igor Gnatyuk
>
> there occurrence of sqlcode:
> + <replaceable class="parameter">sqlcode</replaceable>
> should be:
> <replaceable class="parameter">sqlstate</replaceable>
>
>
> + <para>
> + In the syntax of <command>RAISE</command> command with the
> + <replaceable class="parameter">condition_name</replaceable> or
> + <replaceable class="parameter">sqlcode</replaceable> options
> + <literal>USING</literal> clause can be used to supply a custom
> error message,
> + detail, or hint. A variation of the example above:
> + <programlisting>
> + RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id;
> + </programlisting>
> + </para>
>
> >> options
> >> <literal>USING</literal> clause can be used to supply a custom error message,
> >> detail, or hint.
>
> "options" should be "optional"?
> I am not sure we need to explicitly say, "error message, error detail,
> error hint"?

Attachment Content-Type Size
fix_doc_raise_v3.patch text/x-patch 5.8 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message jian he 2024-05-22 11:13:14 Re: Add small detail to RAISE statement descripton
Previous Message Laurenz Albe 2024-05-22 07:21:10 Re: Ambiguous description on new columns