In oracle there is a built in way to make a transaction autonomous, but in Postgres there is none (still, as far as I know). What should one do in pl/pgsql code to make an equivalency of autonomous transaction functionality in Postgres? Any hack or by pass in coding guide would be helpful. Thanks.
Asked
Active
Viewed 2,238 times
2
-
Possible duplicate of [Committing transactions while executing a postgreql Function](https://stackoverflow.com/questions/22351039/committing-transactions-while-executing-a-postgreql-function) – rogerdpack Nov 24 '17 at 17:16
1 Answers
0
Currently, the way to do this is to use a connection from the database to itself with the dblink
contrib module.

Laurenz Albe
- 209,280
- 17
- 206
- 263
-
**dblink is a module that supports connections to other PostgreSQL databases from within a database session** as the documentation says. – Amir Hossain Sep 02 '16 at 11:59
-
Right. But you can of course also connect to to a database from itself. – Laurenz Albe Sep 02 '16 at 12:05