pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Raymond O'Donnell <rod@iol.ie>
To: Carol Walter <walterc@indiana.edu>
Cc: pgsql-php@postgresql.org
Subject: Re: Begin block
Date: Wed, 01 Jul 2009 18:57:50 +0100
Message-ID: <4A4BA39E.1030304@iol.ie> (raw)
In-Reply-To: <2A0AB159-CE44-4824-A77E-12BE538D7C77@indiana.edu>
References: <2A0AB159-CE44-4824-A77E-12BE538D7C77@indiana.edu>

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
------------------------------------------------------------------



view thread (4+ messages)  latest in thread

Message-ID: <4A4BA39E.1030304@iol.ie>
Permalink:  ../4A4BA39E.1030304@iol.ie/
Also on:    postgresql.org/message-id/4A4BA39E.1030304@iol.ie

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: rod@iol.ie, walterc@indiana.edu
  Subject: Re: Begin block
  In-Reply-To: <4A4BA39E.1030304@iol.ie>
  References: <2A0AB159-CE44-4824-A77E-12BE538D7C77@indiana.edu> <4A4BA39E.1030304@iol.ie>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox