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 14:15:10
Message-ID: 20081002141510.GA4151@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Reg Me Please escribió:
> Well, if it is a limitation, and having it would lead to a "better product",
> why not making it a feature for the next still-open release?

Because no one is working on implementing it?

> In my opinion that's more than a limitation, it's a missing feature.
> In your code you often need to create savepoints to delay the decision for the
> commitment.
> A Pl/PgSQL function is just a bunch of code you want to move into the DB.
> So the need for savepoints seems to me to be still there.

You can nest blocks arbitrarily, giving you the chance to selectively
rollback pieces of the function. It's only a bit more awkward.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reg Me Please 2008-10-02 14:25:19 Re: Transactions within a function body
Previous Message Jonah H. Harris 2008-10-02 13:51:54 Re: Import German Number Format

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2008-10-02 14:19:01 Re: Block-level CRC checks
Previous Message Andrew Chernow 2008-10-02 14:09:38 Re: Block-level CRC checks