diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 3d07b6e..7df69a7 100644
*** a/doc/src/sgml/plpgsql.sgml
--- b/doc/src/sgml/plpgsql.sgml
*************** EXECUTE format('UPDATE tbl SET %I = $1 W
*** 1387,1393 ****
command, which has the form:
! GET CURRENT | STACKED DIAGNOSTICS variable = item , ... ;
This command allows retrieval of system status indicators. Each
--- 1387,1393 ----
command, which has the form:
! GET CURRENT DIAGNOSTICS variable = item , ... ;
This command allows retrieval of system status indicators. Each
*************** GET DIAGNOSTICS integer_var = ROW_COUNT;
*** 1486,1506 ****
affect only the current function.
! Inside a exception handler is possible to use a stacked diagnostics statement. It
! allows a access to exception's data: the RETURNED_SQLSTATE contains
! a SQLSTATE of handled exception. MESSAGE_TEXT contains a message text,
! PG_EXCEPTION_DETAIL has a text that is shown as exception detail,
! PG_EXCEPTION_HINT has a hint related to catched exception.
! PG_EXCEPTION_CONTEXT contains a lines that describes call stack. These
! variables holds a text value. When some field of exception are not filled, then related
! variable contains a empty string,
! An example:
BEGIN
...
EXCEPTION WHEN OTHERS THEN
GET STACKED DIAGNOSTICS text_var1 = MESSAGE_TEXT,
--- 1486,1523 ----
affect only the current function.
+
+
+
+ Obtaining the Exception Status
+
! Inside an exception handler, it's possible to retrieve detailed
! information about the exception which is currently handled, with using a
! GET STACKED DIAGNOSTICS command, which has the form:
!
!
! GET STACKED DIAGNOSTICS variable = item , ... ;
!
! It allows you to access to exception's data: the
! RETURNED_SQLSTATE contains a SQLSTATE of handled
! exception. MESSAGE_TEXT contains a message text,
! PG_EXCEPTION_DETAIL has a text that is shown as
! exception detail, PG_EXCEPTION_HINT has a hint
! related to catched exception. PG_EXCEPTION_CONTEXT
! contains a lines that describes call stack. These variables holds a text
! value. When some of exception fields are not filled, then such variable
! contains an empty string. An example is:
+ DECLARE
+ text_var1 text;
+ text_var2 text;
+ text_var3 text;
BEGIN
+ -- some processing which might cause an exception
...
EXCEPTION WHEN OTHERS THEN
GET STACKED DIAGNOSTICS text_var1 = MESSAGE_TEXT,