Re: question on writing a function - Mailing list pgsql-general

From Moshe Jacobson
Subject Re: question on writing a function
Date
Msg-id CAJ4CxLmSW+_MdeQnPN8_+5v74Vvd4kKciKaKSDP+m5iiscdZ1g@mail.gmail.com
Whole thread Raw
In response to Re: question on writing a function  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general

On Wed, Jan 22, 2014 at 12:08 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
What I would advise in this case is to organize deleted user IDs in a
deletion queue.  You do that by making a 'users to be deleted table'
where you store the users pending deletion (which is the one and only
thing that happens at trigger time).  Then you set up batch process
(say, via cron) that cleans out the data at a convenient time.

Agreed - Your active_status could have three statuses - Active, Inactive, and Deleted. The front end switches it to Inactive, and the cron job looks for all Inactive users, deletes their data and sets them to Deleted.


Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc.
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339

"Quality is not an act, it is a habit." -- Aristotle

pgsql-general by date:

Previous
From: Susan Cassidy
Date:
Subject: Re: CREATE EXTENSION does not seem to work in 9.2
Next
From: Adrian Klaver
Date:
Subject: Re: CREATE EXTENSION does not seem to work in 9.2