Skip site navigation (1) Skip section navigation (2)

Re: Begin block

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Carol Walter <walterc(at)indiana(dot)edu>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Begin block
Date: 2009-07-01 17:57:50
Message-ID: 4A4BA39E.1030304@iol.ie (view raw or flat)
Thread:
Lists: pgsql-php
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(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

pgsql-php by date

Next:From: Hajek, NickDate: 2009-07-01 18:02:02
Subject: Re: Begin block
Previous:From: Carol WalterDate: 2009-07-01 17:52:49
Subject: Begin block

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group