Referential integrity
| От | Mihai Gheorghiu |
|---|---|
| Тема | Referential integrity |
| Дата | |
| Msg-id | 013201c15e2a$134f8360$6e646464@New6.Travel обсуждение исходный текст |
| Ответы |
Re: Referential integrity
|
| Список | 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 по дате отправления: