Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 848C91E74D9B for ; Tue, 29 Nov 2011 17:40:28 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RVVPZ-0007AQ-SC for pgsql-admin@postgresql.org; Tue, 29 Nov 2011 21:40:28 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RVVPL-0001Yy-CQ for pgsql-admin@postgresql.org; Tue, 29 Nov 2011 22:40:07 +0100 Received: from cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com ([86.21.186.149]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Nov 2011 22:40:07 +0100 Received: from walterhurry by cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Nov 2011 22:40:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Walter Hurry Subject: Re: transaction error handling Date: Tue, 29 Nov 2011 20:49:35 +0000 (UTC) Lines: 33 Message-ID: References: <28131.1322067903@sss.pgh.pa.us> <232B5217AD58584C87019E8933556D11036BDE58EB@redmx2.esri.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) X-Pg-Spam-Score: -5.4 (-----) X-Archive-Number: 201111/148 X-Sequence-Number: 38742 On Tue, 29 Nov 2011 09:57:24 -0800, Kasia Tuszynska wrote: > Hi Everybody, > > This is an architectural question. > I am testing on Postgres 9.0.2 on windows and linux(suse, rhel, ubuntu) > > I want to make sure that I have the correct understanding of the > Postgres architecture and would like to enquire if there are any plans > to change it. > > Comparing Oracle and Postgres from the perspective of error handling on > the transaction level I observed the following: > > Oracle: > Begin transaction Insert - no error Implicit savepoint Insert - error > raised Implicit rollback to the savepoint, no transaction loss, error > raised on the insert statement that errored out. > End transaction, implicit commit, with the single error free insert. > > Postgres: > Begin transaction Insert - no error Insert - error raised Transaction > loss = no implicit rollback to the single error free insert. > > Is this a correct interpretation of the Postgres transaction error > handling? > If so, are there any changes being considered, or perhaps already > implemented? I suspect you may be barking up the wrong tree. Comparing default behaviour of PSQL to SQL*Plus is not the same thing as comparing PostgreSQL to Oracle.