| From: | mikie <mikie(dot)pl(at)gmail(dot)com> |
|---|---|
| To: | pgsql-php(at)postgresql(dot)org |
| Subject: | Re: transactions from PHP - double COMMIT required? |
| Date: | 2007-03-01 13:02:57 |
| Message-ID: | ca35ce500703010502j77327b1bn9ca679e9dea38df9@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-php |
> > 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Legault | 2007-03-01 13:16:53 | Re: transactions from PHP - double COMMIT required? |
| Previous Message | Martin Marques | 2007-03-01 12:49:27 | Re: transactions from PHP - double COMMIT required? |