From 38af680ad51d98e895f1968c6cc9f808c88a7725 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 26 May 2005 00:16:31 +0000 Subject: Add PL/pgSQL SQLSTATE and SQLERRM support which sets these values on error. Pavel Stehule --- doc/src/sgml/plpgsql.sgml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'doc/src') 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 @@ @@ -2007,12 +2007,13 @@ END LOOP; - By default, any error occurring in a 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 BEGIN block with an - EXCEPTION clause. The syntax is an extension of the - normal syntax for a BEGIN block: + Any error occurring in PL/pgSQL sets variables + SQLSTATE and 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 BEGIN block with an EXCEPTION + clause. The syntax is an extension of the normal syntax for a + BEGIN block: <<label>> -- cgit v1.2.3