aborted transactions

From: "Peter Garner" <peter(dot)garner(at)toward(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: peter(dot)garner(at)toward(dot)com
Subject: aborted transactions
Date: 1998-10-25 12:34:14
Message-ID: 199810251234.AA50923204@piglet.toward.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi All! :-)

I am using the libpq C interface to access postgres from C++.
I am VERY impressed with postgres!!!

Although postgres does not seem to support nested
transactions, it does support serialized, non nested
transactions. However, it seems to me that if certain
queries fail, the current transaction is aborted and all
queries are ignored until the transaction is ended, either
via commit or rollback. At least that is what seems to be
happening. The following message is printed after every
query (after a failing query) until the transaction is over,
and it does seem that queries are ignored until the end of
transaction :

NOTICE: (transaction aborted): queries ignored until END

So is there anyway to alter this behaviour or should I code
like this will always happen. Also if there is no begin
transaction block, I assume that each statement is a unit
of work and that all subsequent queries will work. I.e. it
would be absurd if one failed query caused all subsequent
queries to be ignored until the connection closed. Is this
correct?

Thank you

Peter

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Garner 1998-10-26 01:00:32 large object error
Previous Message Ken Wills 1998-10-23 18:00:32 Anyone got any advice or pointers on using Pg, mod_perl and persistant DB connections with apache