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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: transactions from PHP - double COMMIT required?



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

OK, so my way of programming seems correct.
Then why do I have to send another COMMIT after failed transaction to
continue with next queries in the same php script ?

--
Mike



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group