Referential integrity

From: "Mihai Gheorghiu" <tanethq(at)earthlink(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Referential integrity
Date: 2001-10-26 14:25:32
Message-ID: 013201c15e2a$134f8360$6e646464@New6.Travel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table named T1 that has two signature fields, F1 and F2.
Both have referential integrity defined as references users table on update
cascade on delete set null.
When I try to change a certain username in users table, I get an error
message like Referential integrity violation key referenced from T1 not
found in users.
My guess is that this happens if a record in T1 has both F1 and F2 with the
value I'm trying to change. Probably the two referential integrity triggers
act completely separately, e.g. when trigger for F1 updates F1, the record
it is trying to save still has F2 with the old value, which violates
referential integrity.
Am I correct? How can I get out of this situation and still get the
referential integrity I need.
Thank you all.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Meenatchi Anbuchelvan 2001-10-26 14:28:42 Blob!!!
Previous Message Tom Lane 2001-10-26 14:11:34 Re: initdb segfault - solaris 8