"Jim C. Nasby" <jnasby@pervasive.com> writes:
> You can't do subtransactions in PostgreSQL, but you can use savepoints:
> http://www.postgresql.org/docs/8.0/interactive/sql-savepoint.html.
>
> Previously, you couldn't do any transactional stuff from inside
> functions. I'm not sure if you can do savepoint-related stuff from
> inside functions in 8.0 or not.
Yes, you certainly can; PL/pgSQL uses savepoints to do its exception
handling.
-Doug