Referential integrity - Mailing list pgsql-general

From Mihai Gheorghiu
Subject Referential integrity
Date
Msg-id 013201c15e2a$134f8360$6e646464@New6.Travel
Whole thread Raw
Responses Re: Referential integrity  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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.


pgsql-general by date:

Previous
From: "CJ Kucera"
Date:
Subject: Database-level permissions?
Next
From: Tom Lane
Date:
Subject: Re: initdb segfault - solaris 8