foreign keys?

From: Jeremy Hansen <jeremy(at)xxedgexx(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: foreign keys?
Date: 2001-07-21 20:15:24
Message-ID: Pine.LNX.4.30.0107211614530.10823-100000@srv1.ecropolis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


dta=> UPDATE test1 SET test_col=2;
ERROR: <unnamed> referential integrity violation - key in test1 still
referenced from test2

I'm following the example in the elephant book on foreign keys and I'm
getting the above error on an update. Has something changed on how
foreign keys work?

Thanks for any help.

My goal is to have another table update itself from a change in the
primary key of another table. Foreign keys is what I should be using,
right?

Thanks
-jeremy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Mulcahy 2001-07-21 20:28:14 create function .... return record
Previous Message Sean Chittenden 2001-07-21 18:59:44 Re: How Postgresql Compares For Query And Load Operations