From:
Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To:
Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc:
PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>,
Reg Me Please <regmeplease(at)gmail(dot)com>,
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:40:22
Message-ID:
20081002154022.GD4151@alvh.no-ip.org (view raw or flat )
Thread:
2008-10-01 15:54:01 from Reg Me Please <regmeplease(at)gmail(dot)com>
2008-10-01 16:16:03 from Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
2008-10-01 21:20:47 from "Dennis Brakhane" <brakhane(at)googlemail(dot)com>
2008-10-02 00:34:42 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-10-02 09:01:37 from "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
2008-10-02 09:53:17 from Richard Huxton <dev(at)archonet(dot)com>
2008-10-02 10:31:47 from Reg Me Please <regmeplease(at)gmail(dot)com>
2008-10-02 11:49:06 from "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
2008-10-02 10:24:59 from Reg Me Please <regmeplease(at)gmail(dot)com>
2008-10-02 14:15:10 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-10-02 14:25:19 from Reg Me Please <regmeplease(at)gmail(dot)com>
2008-10-02 15:10:23 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-10-02 15:18:59 from Reg Me Please <regmeplease(at)gmail(dot)com>
2008-10-02 15:28:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-02 15:30:52 from "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
2008-10-02 15:40:22 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-10-02 15:46:25 from "Bob Henkel" <bob(dot)henkel(at)gmail(dot)com>
2008-10-03 06:30:46 from "Asko Oja" <ascoja(at)gmail(dot)com>
Lists:
pgsql-general pgsql-hackers
Gurjeet Singh escribió:
> I have seen this feature being asked for, and this work-around suggested so
> many times. If plpgql does it internally, why not provide a clean interface
> for this? Is there some road-block, or that nobody has ever tried it?
Initially we aimed at just exposing SAVEPOINT and ROLLBACK TO in
functions, but ran into the problem that the SPI stack needs to be dealt
with appropriately and you can't do it if the user is able to modify it
arbitrarily by calling transaction-modifying commands. That's when the
EXCEPTION idea came up. We never went back and studied whether we could
have fixed the SPI limitation, but it's not trivial.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
In response to
Responses
pgsql-hackers by date
Next :From: Bob HenkelDate: 2008-10-02 15:46:25
Subject : Re: Transactions within a function body
Previous :From : Tom LaneDate : 2008-10-02 15:37:45
Subject : Re: Block-level CRC checks
pgsql-general by date
Next :From: Bob HenkelDate: 2008-10-02 15:46:25
Subject : Re: Transactions within a function body
Previous :From : Alvaro HerreraDate : 2008-10-02 15:37:37
Subject : Re: Transactions within a function body