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 20:07:30
Message-ID: 4693E702.1020607@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jasbinder Singh Bali wrote:
> 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 ?

Yes - if you have two functions A,B then do everything as normal in
each, except you call function B using dblink() from function A. That
will give you a separate session which can commit/rollback separately
from the original.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-07-10 20:14:07 Re: Am I missing something about the output of pg_stop_backup()?
Previous Message Shuo Liu 2007-07-10 19:53:45 exit code -1073741819