Re: transactions in plpgsql

From: "Oleg Lebedev" <oleglebedev(at)waterford(dot)org>
To: "Martin Marques" <martin(at)bugs(dot)unl(dot)edu(dot)ar>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: transactions in plpgsql
Date: 2004-03-19 16:14:45
Message-ID: 993DBE5B4D02194382EC8DF8554A52731D7BC5@postoffice.waterford.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Conway has recently created a dblink patch, which allows the use of
local dblink calls to simulate nested transactions. It worked nicely for
my purposes.

Oleg

-----Original Message-----
From: Richard Huxton [mailto:dev(at)archonet(dot)com]
Sent: Friday, March 19, 2004 8:49 AM
To: Martin Marques; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] transactions in plpgsql

On Friday 19 March 2004 13:01, Martin Marques wrote:
> I'm building some functions in plpgsql, and I got to a point where I
> thought: How are transactions used in the function? Is it posible to
> rollback the modifications that were made to the tables at some point
> in the plpgsql function?

You can abort the entire transaction by raising an exception. Nothing
more
sophisticated is available at the moment.

There might well be nested transactions in 7.5

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

*************************************
This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************

Browse pgsql-general by date

  From Date Subject
Next Message Robert11 2004-03-19 16:34:30 Beginner Questions Please: Which To Go With ?
Previous Message Stephan Szabo 2004-03-19 16:08:09 Re: unsigned types, binary op. and cast pb