From: | Brian Powell <brian(at)owlscreech(dot)com> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Cascading a pseudo-delete? |
Date: | 2000-11-07 17:45:56 |
Message-ID: | B62D8DE4.C2A%brian@owlscreech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Greetings, for our database, we keep everything--deleting nothing; however,
to the client side, it should appear deleted. We do this via a status_cd
for each record. If the status_cd is for 'deleted' then that item is not
shown to the client-side.
Anyhow, my question is that we also use foreign keys, and I would like to
delete the one record and have the deletion cascade to all records using
that foreign key. This is no problem, until I try to no longer delete, but,
change the flag. So, my question is, how can a create a rule which
activates on delete and simply marks the record deleted then cascade that
deletion to all of the objects who are constrained to its key?
Thanks,
--Brian
From | Date | Subject | |
---|---|---|---|
Next Message | Larry Rosenman | 2000-11-07 18:50:48 | Display of RI triggers |
Previous Message | Kate Collins | 2000-11-07 17:18:55 | Trouble Converting Dates |