Commit 8d2e9a9d authored by Peter Eisentraut's avatar Peter Eisentraut

doc: Put PL/pgSQL RAISE USING keywords into a list

Karl O. Pinc
parent 6919b7e3
...@@ -3288,20 +3288,44 @@ RAISE NOTICE 'Calling cs_create_job(%)', v_job_id; ...@@ -3288,20 +3288,44 @@ RAISE NOTICE 'Calling cs_create_job(%)', v_job_id;
You can attach additional information to the error report by writing You can attach additional information to the error report by writing
<literal>USING</> followed by <replaceable <literal>USING</> followed by <replaceable
class="parameter">option</replaceable> = <replaceable class="parameter">option</replaceable> = <replaceable
class="parameter">expression</replaceable> items. The allowed class="parameter">expression</replaceable> items. Each
<replaceable class="parameter">option</replaceable> keywords are <replaceable class="parameter">expression</replaceable> can be any
<literal>MESSAGE</>, <literal>DETAIL</>, <literal>HINT</>, and string-valued expression. The allowed <replaceable
<literal>ERRCODE</>, while each <replaceable class="parameter">option</replaceable> key words are:
class="parameter">expression</replaceable> can be any string-valued
expression. <variablelist id="raise-using-options">
<literal>MESSAGE</> sets the error message text (this option can't <varlistentry>
be used in the form of <command>RAISE</> that includes a format <term><literal>MESSAGE</literal></term>
string before <literal>USING</>). <listitem>
<literal>DETAIL</> supplies an error detail message, while <para>Sets the error message text. This option can't be used in the
<literal>HINT</> supplies a hint message. form of <command>RAISE</> that includes a format string
<literal>ERRCODE</> specifies the error code (SQLSTATE) to report, before <literal>USING</>.</para>
either by condition name as shown in <xref linkend="errcodes-appendix">, </listitem>
or directly as a five-character SQLSTATE code. </varlistentry>
<varlistentry>
<term><literal>DETAIL</literal></term>
<listitem>
<para>Supplies an error detail message.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>HINT</literal></term>
<listitem>
<para>Supplies a hint message.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ERRCODE</literal></term>
<listitem>
<para>Specifies the error code (SQLSTATE) to report, either by condition
name, as shown in <xref linkend="errcodes-appendix">, or directly as a
five-character SQLSTATE code.</para>
</listitem>
</varlistentry>
</variablelist>
</para> </para>
<para> <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment