Re: Implementing 2 different transactions in a PL/Perl function - Mailing list pgsql-general

From Richard Huxton
Subject Re: Implementing 2 different transactions in a PL/Perl function
Date
Msg-id 4693E210.8080604@archonet.com
Whole thread Raw
In response to Implementing 2 different transactions in a PL/Perl function  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
Responses Re: Implementing 2 different transactions in a PL/Perl function  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
List pgsql-general
Jasbinder Singh Bali wrote:
> Hi,
>
> How can I have two different transactions is a plperlu function?
> My purpose is as follows:-
>
> Transaction 1 does some series of inserts in tbl_abc
> Transaction 2 updates some columns in tbl_abc fetching records from some
> other table.

You'll have to connect back to yourself using dblink() or dbilink() -
see contrib/ for details.

Don't forget to consider what it means to have a connection string in a
function-body either.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Ben
Date:
Subject: Am I missing something about the output of pg_stop_backup()?
Next
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Hyper-Trading