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

Re: how to continue a transaction after an error?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Cristi Petrescu-Prahova <cristipp(at)lasting(dot)ro>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to continue a transaction after an error?
Date: 2000-11-13 19:57:48
Message-ID: Pine.BSF.4.21.0011131155090.64868-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Mon, 13 Nov 2000, Cristi Petrescu-Prahova wrote:

> Hello,
> 
> I would like to insert a bunch of rows in a table in a transaction. Some of
> the insertions will fail due to constraints violation. When this happens,
> Postgres automatically ends the transaction and rolls back all the previous
> inserts. I would like to continue the transaction and issue the
> commit/rollback command myself.
> 
> How to do it?
> Is there any setting I am missing?
> Is it possible at all?

Currently, postgres treats all errors as critical ones that require a
complete rollback of transaction (although I believe it does not
immediately do the rollback, it should go into abort state).  There's been
on and off talk about changing this, but nothing really has been decided i
believe.



In response to

pgsql-sql by date

Next:From: Ross J. ReedstromDate: 2000-11-13 20:08:08
Subject: Re: how to continue a transaction after an error?
Previous:From: Cristi Petrescu-PrahovaDate: 2000-11-13 19:41:04
Subject: how to continue a transaction after an error?

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