Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpZeT-00055r-KH for pgsql-admin@arkaria.postgresql.org; Fri, 01 Feb 2019 14:18:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gpZeS-0001HO-3g for pgsql-admin@arkaria.postgresql.org; Fri, 01 Feb 2019 14:18:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpZeR-0001Cb-Ki for pgsql-admin@lists.postgresql.org; Fri, 01 Feb 2019 14:18:39 +0000 Received: from sonic312-20.consmr.mail.bf2.yahoo.com ([74.6.128.82]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpZeO-0000iM-HT for pgsql-admin@lists.postgresql.org; Fri, 01 Feb 2019 14:18:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1549030714; bh=cU+B1oSJML0E7bTOBtLCbVkXOsvfgq+2N/4onY7r2YI=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=VPP6dkXCiYvOvkzUR9XEVsdS7CaDyv6Vfcjb1tw3uWN2m0fU0HmnwXAcdpUYF8gxrZD3jIIprv4RmaLJf+s3NQoRxfj9iJPvWE7nX2bgF/yPZ9OBMoERVrQbiuxfxDTf3sF9LQxdYK2bAcJRZQTHzBWZ3jA240a/rmwKpjgos8khOaWT6lwcYdKHC3WfbhQLq43xlr1AgyJaQfGwaN1iZ3E7HmkVRXKQ9NWj13OOaCxyIUCSkSOYY18irh8aAXPKdsx/3EmTirUUwsofUvKmiF5Z+N5kS9P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juAxLKG8Lrg1GKrDxnRcc74EvpAfVdxe7RZwrpbgD60Ds eGK0kszcZuC81RG3AmWyrIg8gA_JsHgsoC1yndeRv3FZr2QLycYRdjwY.wxrBzxoDPlYiWA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Fri, 1 Feb 2019 14:18:34 +0000 Date: Fri, 1 Feb 2019 14:18:29 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: Shreeyansh Dba Cc: Andrew Gierth , Scott Ribe , Pgsql-admin Message-ID: <1110130949.1383907.1549030709802@mail.yahoo.com> In-Reply-To: References: <1861353148.992207.1548962087385.ref@mail.yahoo.com> <1861353148.992207.1548962087385@mail.yahoo.com> <49E280F0-7021-4FD7-AA99-985A86FA899C@elevated-dev.com> <2031259937.990023.1548963344432@mail.yahoo.com> <5D93F164-7317-43F6-B685-362779757250@elevated-dev.com> <729416431.1006652.1548963751866@mail.yahoo.com> <524354657.997228.1548963965240@mail.yahoo.com> <3842423F-D68D-4BD3-AB34-7508B01B2A9C@elevated-dev.com> <1225497522.1016680.1548965545454@mail.yahoo.com> <8004E05B-CAFA-4620-8E10-09A796064C9B@elevated-dev.com> <677786735.1029265.1548966193847@mail.yahoo.com> <890332297.1033268.1548966904362@mail.yahoo.com> <871s4sa63w.fsf@news-spur.riddles.org.uk> <232412720.1359751.1549027250299@mail.yahoo.com> Subject: Re: insert aborted commands ignored MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1383906_2029041031.1549030709798" X-Mailer: WebService/1.1.13027 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Content-Length: 16438 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1383906_2029041031.1549030709798 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable it worked fine using oracle export and import to oracle unclass and then im= port to postgres using=C2=A0Amazon RDS, the problem is AWS is for unclass a= nd 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.=C2=A0Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Friday, February 1, 2019 8:54 AM, Shreeyansh Dba wrote: =20 Hi Pepe, It look like foreign key reference by child table, so you are trying to in= sert values into chile table "cidr_ds_roles" that don't match with Parent t= able 'cidr_roles".=20 Thanks & Regards, Shreeyansh DBA Team www.shreeyansh.com On Fri, Feb 1, 2019 at 6:51 PM Pepe TD Vo wrote: thank you for your tip.I ran a insert.sql again with AN_ERROR_STOP=3D1 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)=3D(3) is not present in table "cidr_roles" from insert.txt I get=C2=A0INSERT 0 1 (repeat for the rest of insert) thank you.=C2=A0Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Thursday, January 31, 2019 4:09 PM, Andrew Gierth wrote: =20 >>>>> "Pepe" =3D=3D Pepe TD Vo writes: Pepe> here how I run the script Pepe> $ psql -U postgres -d CIDR < insert.sql > insert_cidrmgmt.txt psql -v ON_ERROR_STOP=3D1 -U postgres -d CIDR < insert.sql > insert_cidrmgm= t.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. --=20 Andrew (irc:RhodiumToad) =20 =20 ------=_Part_1383906_2029041031.1549030709798 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
it worked fine using oracle export and import to oracl= e 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 on= e in this world is pure and perfect.  If you avoid people for their mi= stakes 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 outwa= rd 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, Februa= ry 1, 2019 8:54 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:<= br>


Hi Pepe,

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


<= div>
Thanks & Regards,
Shr= eeyansh DBA Team
www.s= hreeyansh.com


On Fri, Feb 1, 2019 at 6:51 PM Pepe TD Vo &= lt;pepevo@yahoo.com> = wrote:
=
thank you for your tip.
I ran a insert.sql again with AN_ER= ROR_STOP=3D1 and output to insert.txt, I get:
ERROR: insert or update on table "cidr_ds_r= oles" violates foreign key constraint "cidr_ds_roles_cidr_roles_fk1"=
DETAIL: key (role_id)= =3D(3) is not present in table "cidr_roles"

INSERT 0 1 (repeat for the rest of insert)

thank you.
&n= bsp;
= Bach-Nga

No one in thi= s world is pure and perfect.  If you avoid people for their mistakes y= ou will be alone. So judge less, love and forgive more.
To cal= l 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 kind= ly.
*= ** Genuinely rich *** Faithful talent *** Sharing success


On Thursday, January 31, 2019 4:09 PM, Andrew Gierth <andrew@tao11= .riddles.org.uk> wrote:


>>>>> "Pepe" =3D= =3D Pepe TD Vo <pepevo@ya= hoo.com> writes:

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

psql -v ON_ERROR_STOP=3D1 -U postgres -d CIDR < insert.sql > ins= ert_cidrmgmt.txt

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

Your .txt file does no= t capture the error because you redirected only
stdout, a= nd errors go to stderr instead.

-- Andrew (irc:RhodiumToad)






------=_Part_1383906_2029041031.1549030709798--