Re: insert aborted commands ignored

From: Pepe TD Vo <pepevo(at)yahoo(dot)com>
To: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: insert aborted commands ignored
Date: 2019-02-01 14:18:29
Message-ID: 1110130949.1383907.1549030709802@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

it worked fine using oracle export and import to oracle unclass and then import to postgres using Amazon RDS, the problem is AWS is for unclass and currently I am doing in the high side and not using AWS.How do I export oracle to postgres to avoid this issue?
thank you. Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success

On Friday, February 1, 2019 8:54 AM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com> wrote:

Hi Pepe,
It look like foreign key reference by child table, so you are trying to insert values into chile table "cidr_ds_roles" that don't match with Parent table 'cidr_roles".

Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com

On Fri, Feb 1, 2019 at 6:51 PM Pepe TD Vo <pepevo(at)yahoo(dot)com> wrote:

thank you for your tip.I ran a insert.sql again with AN_ERROR_STOP=1 and output to insert.txt, I get:ERROR: insert or update on table "cidr_ds_roles" violates foreign key constraint "cidr_ds_roles_cidr_roles_fk1"DETAIL: key (role_id)=(3) is not present in table "cidr_roles"
from insert.txt I get INSERT 0 1 (repeat for the rest of insert)
thank you. Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success

On Thursday, January 31, 2019 4:09 PM, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:

>>>>> "Pepe" == Pepe TD Vo <pepevo(at)yahoo(dot)com> writes:

Pepe> here how I run the script
Pepe> $ psql -U postgres -d CIDR < insert.sql > insert_cidrmgmt.txt

psql -v ON_ERROR_STOP=1 -U postgres -d CIDR < insert.sql > insert_cidrmgmt.txt

That tells psql to stop on the first error, so you'll be able to see
what the real error was.

Your .txt file does not capture the error because you redirected only
stdout, and errors go to stderr instead.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Vatter 2019-02-02 12:04:14 errordump
Previous Message Shreeyansh Dba 2019-02-01 13:53:55 Re: insert aborted commands ignored