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

Proper use of Transactions...

From: Matthew Hagerty <matthew(at)venux(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Proper use of Transactions...
Date: 1999-08-08 20:38:23
Message-ID: 4.1.19990808155400.009f43c0@mail.venux.net (view raw or flat)
Thread:
Lists: pgsql-interfaces
Greetings,

If I write a transaction like this:

begin transaction;
.
.
.
commit transaction;

and an error occurs somewhere in the middle, do I have to issue a rollback
command or will PostgreSQL do that automatically on an error?  The problem
I think I am having is that if some command between the begin and commit
statements causes an error, my program terminates, so I do not have an
opportunity to issue a rollback.

All this is compounded because I am using PHP3 as an Apache module to
access PostgreSQL and I am receiving the following error in my Apache log:

NOTICE:  (transaction aborted): queries ignored until END

I'm not sure where to start looking for the problem.  Any insight would be
greatly appreciated.

Thank you,
Matthew

Responses

pgsql-interfaces by date

Next:From: Alexei GumenchukDate: 1999-08-08 20:40:10
Subject:
Previous:From: teoDate: 1999-08-08 09:30:09
Subject: PgAccess - 0.97b released

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