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

Re: transactions from PHP - double COMMIT required?

From: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: mikie <mikie(dot)pl(at)gmail(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: transactions from PHP - double COMMIT required?
Date: 2007-03-01 12:49:27
Message-ID: Pine.LNX.4.64.0703010948200.606@bugs.unl.edu.ar (view raw or flat)
Thread:
Lists: pgsql-php
On Thu, 1 Mar 2007, mikie wrote:

>
> Yes, that is nice way to work with databases, but I am on PHP4 and I
> am not using the PDO.

MDB2 has a similar sintaxis.

> But getting back to my problem - perhaps there is something I
> misunderstood: is it the client application responsibility to check if
> the transaction failed or succeeded and issue COMMIT or ROLLBACK
> accordingly (how do I close the transaction block in that case)?
> Or is it the database server that is suppose to check if transaction
> succeded and perform the query, or ROLLBACK if anything went wrong?

PG will rollback all transactions that have an error in some part, as it 
can't commit the transaction as a whole.

--
  21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
---------------------------------------------------------
Lic. Martín Marqués         |   SELECT 'mmarques' ||
Centro de Telemática        |       '@' || 'unl.edu.ar';
Universidad Nacional        |   DBA, Programador,
     del Litoral             |   Administrador
---------------------------------------------------------

In response to

Responses

pgsql-php by date

Next:From: mikieDate: 2007-03-01 13:02:57
Subject: Re: transactions from PHP - double COMMIT required?
Previous:From: Martin MarquesDate: 2007-03-01 12:47:22
Subject: Re: transactions from PHP - double COMMIT required?

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