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

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 (view raw or flat)
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




pgsql-interfaces by date

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

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