From: Brian Powell <brian@owlscreech.com>
To: pgsql-sql@postgresql.org
Subject: Cascading a pseudo-delete?
Date: Tue, 07 Nov 2000 10:45:56 -0700
Message-ID: <B62D8DE4.C2A%brian@owlscreech.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: brian@owlscreech.com
Subject: Re: Cascading a pseudo-delete?
In-Reply-To: <B62D8DE4.C2A%brian@owlscreech.com>
References: <B62D8DE4.C2A%brian@owlscreech.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox