X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 35CF752D42 for ; Fri, 25 Feb 2005 15:22:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88608-01 for ; Fri, 25 Feb 2005 15:22:57 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C07A652A8E for ; Fri, 25 Feb 2005 15:22:56 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1PFNGxh005156; Fri, 25 Feb 2005 10:23:17 -0500 (EST) To: "Merlin Moncure" Cc: pgsql-hackers@postgresql.org, "Gavin Sherry" , "Neil Conway" Subject: Re: Where are we on stored procedures? In-reply-to: <6EE64EF3AB31D5448D0007DD34EEB3412A7632@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB3412A7632@Herge.rcsinc.local> Comments: In-reply-to "Merlin Moncure" message dated "Fri, 25 Feb 2005 08:07:53 -0500" Date: Fri, 25 Feb 2005 10:23:16 -0500 Message-ID: <5155.1109344996@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/847 X-Sequence-Number: 64675 "Merlin Moncure" writes: >> 1. Executing outside the database engine, and therefore being able to >> start/commit transactions. (This is *fundamentally* different from our >> current concept of functions, and I think that any implementation that >> tries to gloss over the difference will be doomed to failure.) > Back in the early days of nested transactions, you could begin/commit > while within a transaction...they could be pushed and popped off of a > stack. Those weren't actual transaction starts or commits though; they were (in our current terminology) savepoints. People want *real* commits in stored procedures, not fakes. For instance consider an SP that wants to issue a series of VACUUM commands --- if there's a hidden transaction block around the SP, this must fail. Locking considerations may force use of real commits and real rollbacks, too. You can't release a lock by committing a subtransaction. regards, tom lane