pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC behaviour
Date: Sat, 20 Feb 2016 18:41:20 +0100
Message-ID: <naa8g5$sv4$1@ger.gmane.org> (raw)
In-Reply-To: <CABWW-d3Mu=vto2ML22Q+iQe-znNkQLyyew_FJmZn086oBLiqKA@mail.gmail.com>
References: <VisenaEmail.10e.692062643617cb13.152f4695802@tc7-visena>
	<954cc530fdaf2c5cf63dcb180d05fb56@imap.procolix.com>
	<CAGuFTBXSwk2UmFs_b0wYuTv_BFtLwVmco1mgT5OSb+dwX-U+Sw@mail.gmail.com>
	<4C508581-9CA3-490D-A376-CC1F9FF5D258@me.com>
	<CAGuFTBW_xcn5nWtggiwq46f=6Rc5TYEqwtmiWEEGGfB+PSLbUg@mail.gmail.com>
	<CAMsr+YH3NHZ__xSxWfVH4neGa6w8nLRuLLRG8kqXt9bgE1eEBA@mail.gmail.com>
	<56C8487F.7020406@hogranch.com>
	<CAMsr+YF6nj0Qh+A0J3hJrQD1ofwq_=k_tXUewb0EQO_0uj7Azg@mail.gmail.com>
	<CAKFQuwbo6QZ7dae91mPcnXJyija4EfDX4=F_ULta2hXf4XwbEw@mail.gmail.com>
	<CABWW-d3Mu=vto2ML22Q+iQe-znNkQLyyew_FJmZn086oBLiqKA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

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



view thread (73+ messages)  latest in thread

Message-ID: <naa8g5$sv4$1@ger.gmane.org>
Permalink:  ../naa8g5$sv4$1@ger.gmane.org/
Also on:    postgresql.org/message-id/naa8g5$sv4$1@ger.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: JDBC behaviour
  In-Reply-To: <naa8g5$sv4$1@ger.gmane.org>
  References: <VisenaEmail.10e.692062643617cb13.152f4695802@tc7-visena> <954cc530fdaf2c5cf63dcb180d05fb56@imap.procolix.com> <CAGuFTBXSwk2UmFs_b0wYuTv_BFtLwVmco1mgT5OSb+dwX-U+Sw@mail.gmail.com> <4C508581-9CA3-490D-A376-CC1F9FF5D258@me.com> <CAGuFTBW_xcn5nWtggiwq46f=6Rc5TYEqwtmiWEEGGfB+PSLbUg@mail.gmail.com> <CAMsr+YH3NHZ__xSxWfVH4neGa6w8nLRuLLRG8kqXt9bgE1eEBA@mail.gmail.com> <56C8487F.7020406@hogranch.com> <CAMsr+YF6nj0Qh+A0J3hJrQD1ofwq_=k_tXUewb0EQO_0uj7Azg@mail.gmail.com> <CAKFQuwbo6QZ7dae91mPcnXJyija4EfDX4=F_ULta2hXf4XwbEw@mail.gmail.com> <CABWW-d3Mu=vto2ML22Q+iQe-znNkQLyyew_FJmZn086oBLiqKA@mail.gmail.com> <naa8g5$sv4$1@ger.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