Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 482AF635BA6 for ; Wed, 1 Jul 2009 14:57:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 92901-02 for ; Wed, 1 Jul 2009 14:57:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail24.svc.cra.dublin.eircom.net (mail24.svc.cra.dublin.eircom.net [159.134.118.53]) by mail.postgresql.org (Postfix) with SMTP id 1FB09635806 for ; Wed, 1 Jul 2009 14:57:51 -0300 (ADT) Received: (qmail 57289 messnum 11579907 invoked from network[86.45.249.73/86-45-249-73-dynamic.b-ras3.mvw.galway.eircom.net]); 1 Jul 2009 17:57:49 -0000 Received: from 86-45-249-73-dynamic.b-ras3.mvw.galway.eircom.net (HELO ?127.0.0.1?) (86.45.249.73) by mail24.svc.cra.dublin.eircom.net (qp 57289) with SMTP; 1 Jul 2009 17:57:49 -0000 Message-ID: <4A4BA39E.1030304@iol.ie> Date: Wed, 01 Jul 2009 18:57:50 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Carol Walter CC: pgsql-php@postgresql.org Subject: Re: Begin block References: <2A0AB159-CE44-4824-A77E-12BE538D7C77@indiana.edu> In-Reply-To: <2A0AB159-CE44-4824-A77E-12BE538D7C77@indiana.edu> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 090630-0, 30/06/2009), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/2 X-Sequence-Number: 4032 On 01/07/2009 18:52, Carol Walter wrote: > Hello, > > I'm very much a Postgres PHP novice. I have a number of queries that > need to be run as a single transaction. One set of those will only be > run some of the time, but other times will need to be imbedded in > another block. Can I imbed a begin/commit inside another begin/commit? Hi there, I'm not sure about nested transactions, but you can achieve the same effect with savepoints: http://www.postgresql.org/docs/8.4/static/sql-savepoint.html HTH, Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------