Referential Integrity Problem on UPDATE

From: Nicole Lefresne <nic(dot)lefresne(at)smitsoc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Referential Integrity Problem on UPDATE
Date: 2002-11-09 00:03:56
Message-ID: MhYy9.707836$Ag2.26591881@news2.calgary.shaw.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When I try to update my tblCompanies with

UPDATE tblcompanies SET tblcompanies.strname = 'Biscuit Inc' WHERE
tblcompanies.id = 18732;

I get the following error:
ERROR: tblcompanies_address_fk referential integrity violation -
key in tbladdress still referenced from tblcompanies

My settings:
- tblcompanies.addressid is a foreign key to tbladdress.id
- the constraint in tblcompanies for the address id is:
CONSTRAINT "tblcompanies_address_fk"
FOREIGN KEY ("addressid")
REFERENCES "tbladdress" ("id")
ON DELETE NO ACTION ON UPDATE CASCADE NOT
DEFERRABLE INITIALLY IMMEDIATE,
- I am using postgresql 7.2.1

Has anyone else had a similar problem, or do you know of a solution to
this problem?

Many thanks
;->

Browse pgsql-general by date

  From Date Subject
Next Message Mark Tooker 2002-11-09 00:10:12 psql question
Previous Message elein 2002-11-08 23:48:15 Column based on pg-general