The show errors command does not exist in
PostgreSQL>, and is not needed since errors are
- reported automatically.
+ reported automatically.
The exception names supported by
PL/pgSQL> are
different from Oracle's. The set of built-in exception names
- is much larger (see ).
+ is much larger (see ). There
+ is not currently a way to declare user-defined exception names.
+
+
Implicit Rollback after Exceptions
+
+ In
PL/pgSQL>, when an exception is caught by an
+ EXCEPTION> clause, all database changes since the block's
+ BEGIN> are automatically rolled back. That is, the behavior
+ is equivalent to what you'd get in Oracle with
+
+ BEGIN
+ SAVEPOINT s1;
+ ... code here ...
+ EXCEPTION
+ WHEN ... THEN
+ ROLLBACK TO s1;
+ ... code here ...
+ WHEN ... THEN
+ ROLLBACK TO s1;
+ ... code here ...
+ END;
+
+
+ If you are translating an Oracle procedure that uses
+ SAVEPOINT> and ROLLBACK TO> in this style,
+ your task is easy: just omit the SAVEPOINT> and
+ ROLLBACK TO>. If you have a procedure that uses
+ SAVEPOINT> and ROLLBACK TO> in a different way
+ then some actual thought will be required.
+
+
+
EXECUTE