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

how to continue a transaction after an error?

From: "Cristi Petrescu-Prahova" <cristipp(at)lasting(dot)ro>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: how to continue a transaction after an error?
Date: 2000-11-13 19:41:04
Message-ID: 002e01c04da9$a8f95c20$25efe6c1@lasting.ro (view raw or flat)
Thread:
Lists: pgsql-sql
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?

Thanks,
Cristi


Responses

pgsql-sql by date

Next:From: Stephan SzaboDate: 2000-11-13 19:57:48
Subject: Re: how to continue a transaction after an error?
Previous:From: Steve WamplerDate: 2000-11-13 19:36:35
Subject: Re: Using a postgres table to maintain unique id?

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