Re: Transactions within a function body

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Dennis Brakhane <brakhane(at)googlemail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Transactions within a function body
Date: 2008-10-02 15:10:23
Message-ID: 20081002151023.GB4151@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Reg Me Please escribió:
> Il Thursday 02 October 2008 16:15:10 Alvaro Herrera ha scritto:

> > You can nest blocks arbitrarily, giving you the chance to selectively
> > rollback pieces of the function. It's only a bit more awkward.
>
> You mean I can issue a ROLLBACK command within a BEGIN...END; block to roll it
> back?

No -- I mean you can use BEGIN/EXCEPTION/END blocks as you like, nesting
them or putting one after another. Complementing this with RAISE
EXCEPTION you can cause savepoints to roll back at will.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reg Me Please 2008-10-02 15:18:59 Re: Transactions within a function body
Previous Message Tom Lane 2008-10-02 15:09:17 Re: tsearch 2 query

Browse pgsql-hackers by date

  From Date Subject
Next Message Reg Me Please 2008-10-02 15:18:59 Re: Transactions within a function body
Previous Message Jonah H. Harris 2008-10-02 14:48:32 Re: Block-level CRC checks