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

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(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:52:08
Message-ID: a47902760707101252w572a307dh8c898bf205bbfbde@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You mean to say keep using spi_exec till I want everything in the same
transaction and the point where I want a separate transaction, use DBI ?

On 7/10/07, Richard Huxton <dev(at)archonet(dot)com> wrote:
>
> 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 Shuo Liu 2007-07-10 19:53:45 exit code -1073741819
Previous Message Andrej Ricnik-Bay 2007-07-10 19:51:51 Re: Hyper-Trading