pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: Current transaction is aborted, commands ignored until end of transaction block
Date: Fri, 30 Dec 2011 12:18:09 +0100
Message-ID: <jdk6lb$pqf$1@dough.gmane.org> (raw)
In-Reply-To: <4EFD9B67.30308@mejor.pl>
References: <4EFD3D32.9060902@greenpeace.org>
	<13131805-BCBB-42DF-953B-27EE36AAF213@yahoo.com>
	<4EFD79BA.50508@greenpeace.org>
	<201112301044.33861.leif@solumslekt.org>
	<jdk5q0$kho$1@dough.gmane.org>
	<4EFD9B67.30308@mejor.pl>

Marcin Mirosław wrote on 30.12.2011 12:07:
>>>> Would be nice to have an option in PostgreSQL something along the lines
>>>> of:  'abort-transaction-on-constraint-violation = false'....
>>>
>>> That option is called MySQL with MyISAM tables.
>>>
>> Not true.
>>
>> Oracle and others (I believe at least DB2) behave such that you can
>> insert a bunch of rows and if one or more throw a constraint violation,
>> the transaction can still be committed persisting those that do not
>> violate the constraint.
>
> Hi,
> isn't this option:
> http://www.postgresql.org/docs/current/static/sql-set-constraints.html ?
> Regards
>
Not that's something different.
It would still prevent comitting the transaction if the constraint check fails at the end.

This strict transaction concept is somewhat irritating when you come from other DBMS (such as Oracle or DB2).
Using savepoints is the only option to "simulate" that behaviour in PostgreSQL (and then the constraints need to be immediate)

Thomas





view thread (17+ messages)  latest in thread

Message-ID: <jdk6lb$pqf$1@dough.gmane.org>
Permalink:  ../jdk6lb$pqf$1@dough.gmane.org/
Also on:    postgresql.org/message-id/jdk6lb$pqf$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Current transaction is aborted, commands ignored until end of transaction block
  In-Reply-To: <jdk6lb$pqf$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox