Some text was still claiming that committing transactions was not
possible in PL/pgSQL.
for transaction
control.
PL/pgSQL's
BEGIN/
END
are only for grouping; they do not start or end a transaction.
- Functions are always executed within a transaction
- established by an outer query — they cannot start or commit that
- transaction, since there would be no context for them to execute in.
- However, a block containing an EXCEPTION clause effectively
+ See for information on managing
+ transactions in
PL/pgSQL.
+ Also, a block containing an EXCEPTION clause effectively
forms a subtransaction that can be rolled back without affecting the
outer transaction. For more about that see
linkend="plpgsql-error-trapping"/>.