pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gilles Darold <gilles@darold.net>
To: Jagmohan Kaintura <jagmohan@tecorelabs.com>
To: 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 09:37:20 +0200
Message-ID: <a829f865-49bb-781e-0877-dcff179235ba@darold.net> (raw)
In-Reply-To: <CA+cYFtu4DfhHkxc=U_FMC-p4qYu4fXN206V9=0BTHB=B_uLtdg@mail.gmail.com>
References: <CA+cYFtu4DfhHkxc=U_FMC-p4qYu4fXN206V9=0BTHB=B_uLtdg@mail.gmail.com>

Le 21/06/2022 à 09:08, Jagmohan Kaintura a écrit :
> Hi Team,
> We are working on a project where we are moving from Oracle to 
> PostgreSQL and working on a migration tool which mostly have 
> statements for inserting the records which are correct and logging the 
> errors in error table using ORACLE inbuilt statement for INSERT ALL 
> with DML ERROR logging.
>
> As part of the postgresql best practices, what approach are we taking 
> to move these types of statements in Postgresql as we don't have any 
> such equivalent mechanism to load correct data in the main table and 
> error record in error table with error reason.
>
> The statements mostly used are -->
> INSERT ALL INTO
> target_table
> (COLUMN LIST)
> VALUES()
> LOG ERROR INTO ...
> SELECT statement considering the source tables;
>
> )
> Can anyone please help me with what could be the best approach to 
> convert this in the tool.
>
> -- 
> *Best Regards,*
> Jagmohan


Hi,


Maybe what you are looking for is here 
https://github.com/MigOpsRepos/pg_dbms_errlog , this is a PostgreSQL 
extension that emulates the DBMS_ERRLOG Oracle package.


Best regards,

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

view thread (5+ messages)  latest in thread

Message-ID: <a829f865-49bb-781e-0877-dcff179235ba@darold.net>
Permalink:  ../a829f865-49bb-781e-0877-dcff179235ba@darold.net/
Also on:    postgresql.org/message-id/a829f865-49bb-781e-0877-dcff179235ba@darold.net

 · 

reply

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: <a829f865-49bb-781e-0877-dcff179235ba@darold.net>
  References: <CA+cYFtu4DfhHkxc=U_FMC-p4qYu4fXN206V9=0BTHB=B_uLtdg@mail.gmail.com> <a829f865-49bb-781e-0877-dcff179235ba@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