From: Gilles Darold <gilles@darold.net>
To: Jagmohan Kaintura <jagmohan@tecorelabs.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL
Date: Tue, 21 Jun 2022 10:54:21 +0200
Message-ID: <e2b4b11d-a8a4-93aa-8f89-1063f95b43a6@darold.net> (raw)
In-Reply-To: <CA+cYFtuhfe77o-jpYtL=P0c52Bi0Ku5zasZGCWYoxuXskJEq7Q@mail.gmail.com>
References: <CA+cYFtu4DfhHkxc=U_FMC-p4qYu4fXN206V9=0BTHB=B_uLtdg@mail.gmail.com>
<a829f865-49bb-781e-0877-dcff179235ba@darold.net>
<CA+cYFtuhfe77o-jpYtL=P0c52Bi0Ku5zasZGCWYoxuXskJEq7Q@mail.gmail.com>
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/
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-general@postgresql.org
Cc: gilles@darold.net, jagmohan@tecorelabs.com
Subject: Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL
In-Reply-To: <e2b4b11d-a8a4-93aa-8f89-1063f95b43a6@darold.net>
References: <CA+cYFtu4DfhHkxc=U_FMC-p4qYu4fXN206V9=0BTHB=B_uLtdg@mail.gmail.com> <a829f865-49bb-781e-0877-dcff179235ba@darold.net> <CA+cYFtuhfe77o-jpYtL=P0c52Bi0Ku5zasZGCWYoxuXskJEq7Q@mail.gmail.com> <e2b4b11d-a8a4-93aa-8f89-1063f95b43a6@darold.net>
* 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