Re: JDBC behaviour

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: JDBC behaviour
Дата
Msg-id naa8g5$sv4$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: JDBC behaviour  (Vitalii Tymchyshyn <vit@tym.im>)
Список pgsql-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.




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Vitalii Tymchyshyn
Дата:
Сообщение: Re: JDBC behaviour
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: JDBC behaviour