Re: Implementing 2 different transactions in a PL/Perl function

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jasbinder Singh Bali <jsbali(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Implementing 2 different transactions in a PL/Perl function
Date: 2007-07-10 19:46:24
Message-ID: 4693E210.8080604@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-07-10 19:51:43 Re: Implementing 2 different transactions in a PL/Perl function
Previous Message Ben 2007-07-10 19:44:08 Am I missing something about the output of pg_stop_backup()?