Forum OpenACS Q&A: Response to Transactions in PL/PgSQL ?

Collapse
Posted by Don Baccus on
Slight correction ... every top-level PG statement is executed in an implicit transaction if it is not part of an explicit transaction (i.e. not wrapped in BEGIN/END).

Since functions can only be called from within SQL statement in PG, in practice Dan's statement work well enough.  But in some cases, for instance where concurrency impacts tuple visibility, it's important to know that all function calls within a PG statement execute within the explicit or implicit transaction containing the statement.