Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aXBXG-0006SE-Ow for pgsql-jdbc@arkaria.postgresql.org; Sat, 20 Feb 2016 17:41:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aXBXG-0001bB-BS for pgsql-jdbc@arkaria.postgresql.org; Sat, 20 Feb 2016 17:41:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aXBXF-0001aZ-TS for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 17:41:38 +0000 Received: from plane.gmane.org ([80.91.229.3]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aXBXC-000447-U1 for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 17:41:36 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aXBX9-0006JB-H9 for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 18:41:31 +0100 Received: from ppp-46-244-205-114.dynamic.mnet-online.de ([46.244.205.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Feb 2016 18:41:31 +0100 Received: from spam_eater by ppp-46-244-205-114.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Feb 2016 18:41:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: JDBC behaviour Date: Sat, 20 Feb 2016 18:41:20 +0100 Lines: 19 Message-ID: References: <954cc530fdaf2c5cf63dcb180d05fb56@imap.procolix.com> <4C508581-9CA3-490D-A376-CC1F9FF5D258@me.com> <56C8487F.7020406@hogranch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-46-244-205-114.dynamic.mnet-online.de 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: X-Pg-Spam-Score: -2.6 (--) 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 Vitalii Tymchyshyn schrieb am 20.02.2016 um 17:01: > Well, it OT here and belongs to -hackers, but as for me main use case > here is ETL or ELT process getting a lot of unvalidated external > data. And a good option to solve this problem is not to change > transaction semantics or slow down processing by adding tons of > savepoints, but add "on error" clause to insert/copy statement. > You can use INSERT .. ON CONFLICT ... to ignore the erroneous rows for unique constraint violations. It's not the same as Oracle's ON ERROR clause, but you don't need savepoints and you can use JDBC batching with that as well. For all other constraint violations I usually put the import data into a staging table anyway - even with Oracle. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc