From sivagami@worlddata.com Tue Dec 12 13:46:10 2000 Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBCDkAm68990 for ; Tue, 12 Dec 2000 08:46:10 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from thor.tht.net (thor.tht.net [209.47.145.4]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB5MRXt33720 for ; Tue, 5 Dec 2000 17:27:33 -0500 (EST) (envelope-from sivagami@worlddata.com) Received: from hydra.worlddata.com (hydra.worlddata.com [209.244.192.166]) by thor.tht.net (8.9.3/8.9.3) with ESMTP id SAA62523 for ; Tue, 5 Dec 2000 18:12:09 GMT (envelope-from sivagami@worlddata.com) Received: from dragon ([209.244.192.67]) by hydra.worlddata.com (Netscape Messaging Server 4.15) with SMTP id G548AY00.UOG for ; Tue, 5 Dec 2000 17:11:22 -0500 Message-ID: <006601c05f08$49e27990$43c0f4d1@worlddata.com> From: "Sivagami ." To: Subject: Foreign key constraint Date: Tue, 5 Dec 2000 17:11:16 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0063_01C05EDE.60F714D0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Archive-Number: 200012/81 X-Sequence-Number: 412 This is a multi-part message in MIME format. ------=_NextPart_000_0063_01C05EDE.60F714D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have a question. I tried adding a Foreign Key constraint to a table via t= he ALTER TABLE command. But the records in the table did not match with tho= se in the Parent table. Now my Alter table command, instead of giving me an= error of kind - 'records do not match', has gone into a kind of Deadlock = between the 2 tables. I am not able to select from the tables, nor delete t= hem, nor drop them. If I try to do any of these, I get the error saying - " Error : RelationBuildTriggers: 2 record(s) not found for rel invoice" How do I overcome this error. Any ideas will be greatly appreciated. Thanks a lot in advance. Shiva. ------=_NextPart_000_0063_01C05EDE.60F714D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hi,
 
I have a question. I tried adding a Foreign Key constra= int to=20 a table via the ALTER TABLE command. But the records in the table did not m= atch=20 with those in the Parent table. Now my Alter table command, instead of givi= ng me=20 an error of kind - 'records do not match',  has gone into a kind = of=20 Deadlock between the 2 tables. I am not able to select from the tables, nor= =20 delete them, nor drop them. If I try to do any of these, I get the err= or=20 saying -
" Error :  RelationBuildTriggers: 2 record(s)= not=20 found for rel invoice"
 
How do I overcome this error. Any ideas will be greatly= =20 appreciated.
Thanks a lot in advance.
 
Shiva.
------=_NextPart_000_0063_01C05EDE.60F714D0-- From jliang@jliang.ipinc.com Tue Dec 12 20:40:39 2000 Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBCKedm43695 for ; Tue, 12 Dec 2000 15:40:39 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from jliang.ipinc.com (jliang.ipinc.com [199.245.188.130]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBCIj2m27392 for ; Tue, 12 Dec 2000 13:45:02 -0500 (EST) (envelope-from jliang@jliang.ipinc.com) Received: from localhost (jliang@localhost) by jliang.ipinc.com (8.9.3/8.9.3) with ESMTP id KAA25672; Tue, 12 Dec 2000 10:36:03 -0800 (PST) (envelope-from jliang@jliang.ipinc.com) Date: Tue, 12 Dec 2000 10:36:03 -0800 (PST) From: Jie Liang To: "Sivagami ." cc: pgsql-sql@postgresql.org Subject: Re: Foreign key constraint In-Reply-To: <006601c05f08$49e27990$43c0f4d1@worlddata.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200012/91 X-Sequence-Number: 424 Recovery try use: pg_dump -t tbname -f outfile dbname use vi erase f key from outfile, drop old table, reload them. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 jliang@ipinc.com www.ipinc.com