[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: INSERT ALL with DML ERROR Logging replacement in PostgreSQL
From: Jagmohan Kaintura <jagmohan () tecorelabs ! com>
Date: 2022-06-23 6:37:38
Message-ID: CA+cYFtvn9cr3rOzRd7-G+DOrOkndjYFMA1R6HsiGmg7VD-J5fg () mail ! gmail ! com
[Download RAW message or body]
Hi ALl,
Any other thought on this thread.
On Tue, Jun 21, 2022 at 2:24 PM Gilles Darold <gilles@darold.net> wrote:
> 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 Daroldhttp://www.darold.net/
>
>
--
*Best Regards,*
Jagmohan
[Attachment #3 (text/html)]
<div dir="ltr"><div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large">Hi ALl,</div><div \
class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large"><br></div><div \
class="gmail_default" style="font-family:verdana,sans-serif;font-size:large">Any \
other thought on this thread.</div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Tue, Jun 21, 2022 at 2:24 PM Gilles Darold <<a \
href="mailto:gilles@darold.net">gilles@darold.net</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">
<div>
<div>Le 21/06/2022 Ã 10:28, Jagmohan
Kaintura a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large">Hi \
Gilles,</div>
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large"><br> </div>
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large">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.</div>
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large"><br> </div>
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large"><span>The form \
</span><code>INSERT INTO <tablename> SELECT ...</code><span> 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.</span><br>
</div>
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large"><br> </div>
<div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:large">Our all statements are of \
that form will it be still useful.<br> </div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<p>Best regards,<br>
</p>
<pre cols="72">--
Gilles Darold
<a href="http://www.darold.net/" target="_blank">http://www.darold.net/</a></pre>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><font face="verdana, sans-serif" \
size="4"><b>Best Regards,</b></font><div><font face="verdana, sans-serif" \
size="4">Jagmohan</font><span style="font-family:verdana,sans-serif;font-size:large"> \
</span></div></div></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic