Hi, The attached patch, raise_using_keyword_table.patch, puts the pl/pgsql RAISE USING keywords into a table, replacing a prose description.
Against HEAD. Karl <k...@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 07fba57..c31d0c2 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -3274,20 +3274,55 @@ RAISE NOTICE 'Calling cs_create_job(%)', v_job_id; You can attach additional information to the error report by writing <literal>USING</> followed by <replaceable class="parameter">option</replaceable> = <replaceable - class="parameter">expression</replaceable> items. The allowed - <replaceable class="parameter">option</replaceable> keywords are - <literal>MESSAGE</>, <literal>DETAIL</>, <literal>HINT</>, and - <literal>ERRCODE</>, while each <replaceable - class="parameter">expression</replaceable> can be any string-valued - expression. - <literal>MESSAGE</> sets the error message text (this option can't + class="parameter">expression</replaceable> items. Each + <replaceable class="parameter">expression</replaceable> can be any + string-valued expression. The allowed <replaceable + class="parameter">option</replaceable> keywords are: + </para> + + <table id="using-keywords"> + <title>RAISE USING Keywords</title> + + <tgroup cols="2"> + <thead> + <row> + <entry>Keyword</entry> + <entry>Purpose</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>MESSAGE</literal></entry> + <entry>Error message text</entry> + </row> + + <row> + <entry><literal>DETAIL</literal></entry> + <entry>Detailed error message</entry> + </row> + + <row> + <entry><literal>HINT</literal></entry> + <entry>Hint message</entry> + </row> + + <row> + <entry><literal>ERRCODE</literal></entry> + <entry>Error code (SQLSTATE) to report</entry> + </row> + </tbody> + </tgroup> + </table> + + <para><literal>MESSAGE</> can't be used in the form of <command>RAISE</> that includes a format - string before <literal>USING</>). - <literal>DETAIL</> supplies an error detail message, while - <literal>HINT</> supplies a hint message. - <literal>ERRCODE</> 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. + string before <literal>USING</>. + </para> + + <para><literal>ERRCODE</> may be specified either by condition name, + as shown in <xref linkend="errcodes-appendix">, or directly as a + five-character SQLSTATE code. </para> <para>
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers