Dave Peticolas <dave@krondo.com> writes:
> Do stored functions (say, in plpgsql) run in their own transaction?
Nope, they are part of the transaction of the query that invokes them.
Postgres doesn't have nested transactions (not yet, anyway).
regards, tom lane