RE: Foriegn key constraint

From: "Trewern, Ben" <Ben(dot)Trewern(at)mowlem(dot)com>
To: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: RE: Foriegn key constraint
Date: 2000-12-12 14:17:47
Message-ID: 996802F75C3CD411B424001083FA445B059508@CET_PONXX_FP001
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I am pretty sure that the ALTER TABLE command does not do any checking when
it creates the triggers which produce a foreign key constraint. The DBA is
assumed to have checked the tables before they create the constraint. Best
thing I can think of is to do is drop these triggers and then sort out your
table before setting up your foreign key constraint.

Hope this helps

Ben

-----Original Message-----
From: Sivagami . [mailto:sivagami(at)worlddata(dot)com]
Sent: 05 December 2000 22:04
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Foriegn key constraint

Hi,

I have a question. I tried adding a Foreign Key constraint to a table via
the ALTER TABLE command. But the records in the table did not match with
those 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
them, 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.

Browse pgsql-admin by date

  From Date Subject
Next Message R D 2000-12-12 14:19:48 Index usage ?
Previous Message Bruce Momjian 2000-12-12 13:48:59 Re: [PORTS] Re: 1)Can't compile with ODBC support. 2)FATAL 1: AllocSetAlloc() on Pentium computer.