Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 0187AC24693 for ; Fri, 30 Dec 2011 07:18:35 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RgaTn-0007Tr-Kv for pgsql-sql@postgresql.org; Fri, 30 Dec 2011 11:18:35 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RgaTZ-0005T7-2s for pgsql-sql@postgresql.org; Fri, 30 Dec 2011 12:18:17 +0100 Received: from host-188-174-161-46.customer.m-online.net ([188.174.161.46]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Dec 2011 12:18:17 +0100 Received: from spam_eater by host-188-174-161-46.customer.m-online.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Dec 2011 12:18:17 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Thomas Kellerer Subject: Re: Current transaction is aborted, commands ignored until end of transaction block Date: Fri, 30 Dec 2011 12:18:09 +0100 Lines: 26 Message-ID: References: <4EFD3D32.9060902@greenpeace.org> <13131805-BCBB-42DF-953B-27EE36AAF213@yahoo.com> <4EFD79BA.50508@greenpeace.org> <201112301044.33861.leif@solumslekt.org> <4EFD9B67.30308@mejor.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: host-188-174-161-46.customer.m-online.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: <4EFD9B67.30308@mejor.pl> X-Pg-Spam-Score: -5.5 (-----) X-Archive-Number: 201112/95 X-Sequence-Number: 36156 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