Skip site navigation (1) Skip section navigation (2)

Re: Transactions within a function body

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(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:18:59
Message-ID: 200810021718.59515.regmeplease@gmail.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Il Thursday 02 October 2008 17:10:23 Alvaro Herrera ha scritto:
> 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.

Now I understand. (Sorry, me dumb!)

Looks quirky, but I trust it's working. I'll give that a try.

In response to

pgsql-hackers by date

Next:From: Jonah H. HarrisDate: 2008-10-02 15:27:00
Subject: Re: Block-level CRC checks
Previous:From: Alvaro HerreraDate: 2008-10-02 15:10:23
Subject: Re: Transactions within a function body

pgsql-general by date

Next:From: Tom LaneDate: 2008-10-02 15:28:13
Subject: Re: Transactions within a function body
Previous:From: Alvaro HerreraDate: 2008-10-02 15:10:23
Subject: Re: Transactions within a function body

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group