PostgreSQL multiple transactions on the same connection

postgresql

Solution

If with unrelated you mean one after the other, then the answer is yes.

If you mean having different transactions open at the same time, then the answer is no (there are some hacks available using dblink but I don't think they qualify as "on the same connection).

Problem

Does PostgreSQL support multiple transactions on the same connection? I don't mean nested transactions, but unrelated different transactions.

Original source