Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL

Поиск
Список
Период
Сортировка
От Gilles Darold
Тема Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL
Дата
Msg-id e2b4b11d-a8a4-93aa-8f89-1063f95b43a6@darold.net
обсуждение исходный текст
Ответ на Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL  (Jagmohan Kaintura <jagmohan@tecorelabs.com>)
Ответы Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL  (Jagmohan Kaintura <jagmohan@tecorelabs.com>)
Список pgsql-general
Le 21/06/2022 à 10:28, Jagmohan Kaintura a écrit :
Hi Gilles,

I was going though this earlier today but didn't compiled it as I read it may not be able to capture the errors if we have below type of statement and most of our statements are of INSERT .. SELECT statements only.

The form INSERT INTO <tablename> SELECT ... will not have the same behavior than in Oracle. It will not stored the successful insert and logged the rows in error. This is not supported because it is a single transaction for PostgreSQL and everything is rolled back in case of error.

Our all statements are of that form will it be still useful.


Right, this was not obvious in your post, but yes if you are using INSERT + SELECT this is not possible with the current version of this extension. Maybe that could be possible by rewriting internally the query to loop over the result of the select and generate an insert per row returned, but with performances lost of courses.


Best regards,

-- 
Gilles Darold
http://www.darold.net/

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

Предыдущее
От: Jagmohan Kaintura
Дата:
Сообщение: Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL
Следующее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: Reminder: Call for Papers for PostgreSQL Conference Europe 2022 is closing soon!