Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aXBNp-000622-BZ for pgsql-jdbc@arkaria.postgresql.org; Sat, 20 Feb 2016 17:31:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aXBNo-00081g-UK for pgsql-jdbc@arkaria.postgresql.org; Sat, 20 Feb 2016 17:31:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aXBNo-00081a-MF for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 17:31:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aXBNj-0004iZ-ON for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 17:31:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1KHVcvn021532; Sat, 20 Feb 2016 12:31:38 -0500 From: Tom Lane To: Bill Moran cc: Vitalii Tymchyshyn , Craig Ringer , "David G. Johnston" , John R Pierce , "pgsql-jdbc@postgresql.org" Subject: Re: JDBC behaviour In-reply-to: <20160220120901.58bea0d780fad45775f04bfa@potentialtech.com> References: <954cc530fdaf2c5cf63dcb180d05fb56@imap.procolix.com> <4C508581-9CA3-490D-A376-CC1F9FF5D258@me.com> <56C8487F.7020406@hogranch.com> <20160220111625.4ee764661333e42e230348ad@potentialtech.com> <20160220120901.58bea0d780fad45775f04bfa@potentialtech.com> Comments: In-reply-to Bill Moran message dated "Sat, 20 Feb 2016 12:09:01 -0500" Date: Sat, 20 Feb 2016 12:31:38 -0500 Message-ID: <21531.1455989498@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Bill Moran writes: > On Sat, 20 Feb 2016 16:29:09 +0000 > Vitalii Tymchyshyn wrote: >> Well, I suppose replacing simple copy with procedural per-row function >> would give huge performance hit. Also what method do you propose to use in >> the code? Savepoints? > Not at all. PL/PGSQL's ON ERROR handling can manage this without needing > savepoints. Actually, plpgsql's exception blocks *are* savepoints under the hood. The backend engine does not have any way of recovering from errors other than a (sub)transaction abort, which means you can't do this without a savepoint or equivalent. regards, tom lane -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc