Re: JDBC behaviour
От | Bill Moran |
---|---|
Тема | Re: JDBC behaviour |
Дата | |
Msg-id | 20160220111625.4ee764661333e42e230348ad@potentialtech.com обсуждение исходный текст |
Ответ на | Re: JDBC behaviour (Vitalii Tymchyshyn <vit@tym.im>) |
Ответы |
Re: JDBC behaviour
Re: JDBC behaviour |
Список | pgsql-jdbc |
On Sat, 20 Feb 2016 16:01:04 +0000 Vitalii Tymchyshyn <vit@tym.im> wrote: > 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. > > This clause should allow to save records that can't fit into destination > table because of type, check of referential constaints into error table. > Oracle has similar functionality and we are using it in our project. No > error is generated - no transaction rollback, batch abort or similar. > > As for me it would cover 90% of use cases and would be really usefull. The > one problem I can see is with inserting into partition parent. PL/PGSQL provides this functionality. It requires the creation of a server side function and using that function to insert data, but it can do exactly what you're describing. While adding other mechanisms to make it "easier" or "more like some other software" might be valuable; the simple fact is that Postgres _does_ support what you want. The fact that you're not aware of it doesn't change that. -- Bill Moran
В списке pgsql-jdbc по дате отправления: