Nested transaction workaround? - Mailing list pgsql-general

From John Sidney-Woollett
Subject Nested transaction workaround?
Date
Msg-id 3609.192.168.0.64.1073998023.squirrel@mercury.wardbrook.com
Whole thread Raw
Responses Re: Nested transaction workaround?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Is it possible to use the dblink and dblink_exec features from inside
pl/pgsql functions to mimic the behaviour of nested transactions by
calling another function or executing some SQL via the dblink (into the
same database)?

Does the SQL statement executed within the dblink sit in its own isolated
transaction/session? And would an error thrown in the dblink statement
abort the enclosing session that initiated the call?

What is the overhead/cost in creating the dblink connection?

I'm asking these questions before trying this out, just in case someone
else has already tried, and either failed or succeeded.

John Sidney-Woollett

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Parse error help needed...
Next
From: "Chris Travers"
Date:
Subject: Re: Drawbacks of using BYTEA for PK?