Received: from sisyphus.owlscreech.com (owlscreech.com [207.174.31.35]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eA7Hk6s69356 for ; Tue, 7 Nov 2000 12:46:06 -0500 (EST) (envelope-from brian@owlscreech.com) Received: from [192.168.0.2] ([63.229.251.51]) by sisyphus.owlscreech.com (8.9.3/8.8.7) with ESMTP id KAA01527 for ; Tue, 7 Nov 2000 10:47:57 -0700 User-Agent: Microsoft-Entourage/9.0.2509 Date: Tue, 07 Nov 2000 10:45:56 -0700 Subject: Cascading a pseudo-delete? From: Brian Powell To: Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Archive-Number: 200011/51 X-Sequence-Number: 82 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