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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

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