X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A7C239DC99E for ; Tue, 14 Mar 2006 18:41:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38553-02 for ; Tue, 14 Mar 2006 18:41:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by postgresql.org (Postfix) with SMTP id 2F43A9DC80A for ; Tue, 14 Mar 2006 18:41:32 -0400 (AST) Received: (qmail 30183 invoked by uid 417); 14 Mar 2006 22:41:34 -0000 Received: from tango-.softhome.net (HELO softhome.net) (172.16.2.14) by shunt-smtp-com-out-com-0 with SMTP; 14 Mar 2006 22:41:34 -0000 Received: from [10.27.93.86] ([209.163.142.248]) (AUTH: PLAIN scottpetersen@softhome.net) by softhome.net with esmtp; Tue, 14 Mar 2006 15:41:33 -0700 Message-ID: <4417469C.8020600@softhome.net> Date: Tue, 14 Mar 2006 15:41:32 -0700 From: Scott Petersen User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Savepoint/Rollback in functions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/223 X-Sequence-Number: 24569 I am running postgres 8.1.2 on both a windows and Linux platform. The primary method of managing business logic is through the use of functions. Our primary access to the database is by using PSQL (pg/psql). The problem that I am having is that we need to execute and implement "SAVEPOINT" and "ROLLBACK" functionality inside of FUNCTIONS. The "SAAVEPOINT/ROLLBACK" works fine interactively. At the present time the documentation does not seem to be definitive on the functionality of this, BUT, we placed "SAVEPOINT/ROLLBACK" commands in a test function and the function failed. Question 1: does pg/psql functions allow "SAVEPOINT/ROLLBACK" functionality? (if so how?) Question 2: if the answer to question 1 is "NO", what would be required to get this implemented in the standard product? Thanks in advance for any information and help. Scott.