summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian2005-05-26 00:16:31 +0000
committerBruce Momjian2005-05-26 00:16:31 +0000
commit38af680ad51d98e895f1968c6cc9f808c88a7725 (patch)
tree499a4092e18798009689ca435796df46b9b22265 /doc/src
parent8c792fe9cbe1dcfdafcdc70b961be714631324ec (diff)
Add PL/pgSQL SQLSTATE and SQLERRM support which sets these values on
error. Pavel Stehule
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/plpgsql.sgml15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 0fe722cb887..17e62744c5e 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.67 2005/04/19 03:55:43 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.68 2005/05/26 00:16:31 momjian Exp $
-->
<chapter id="plpgsql">
@@ -2007,12 +2007,13 @@ END LOOP;
</indexterm>
<para>
- By default, any error occurring in a <application>PL/pgSQL</>
- function aborts execution of the function, and indeed of the
- surrounding transaction as well. You can trap errors and recover
- from them by using a <command>BEGIN</> block with an
- <literal>EXCEPTION</> clause. The syntax is an extension of the
- normal syntax for a <command>BEGIN</> block:
+ Any error occurring in <application>PL/pgSQL</> sets variables
+ <varname>SQLSTATE</> and <varname>SQLERRM</>, and, by default,
+ aborts execution of the function, and indeed of the surrounding
+ transaction as well. You can trap errors and recover from them by
+ using a <command>BEGIN</> block with an <literal>EXCEPTION</>
+ clause. The syntax is an extension of the normal syntax for a
+ <command>BEGIN</> block:
<synopsis>
<optional> &lt;&lt;<replaceable>label</replaceable>&gt;&gt; </optional>