By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,693 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,693 IT Pros & Developers. It's quick & easy.

automatic verifications

P: n/a
Hi!

I am new with PostgreSQL and I want to know if this database give the
possibility to verify automatically, each night, if some records are
too old (by example, if session_date is older than a month) and if so
delete them.

Thanks for your help!

Melanie

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Melanie Bergeron <mb**********@globeecom.com> writes:
Hi!

I am new with PostgreSQL and I want to know if this database give the
possibility to verify automatically, each night, if some records are
too old (by example, if session_date is older than a month) and if so
delete them.


That's not really something you would build into a server. I'd do it
by writing a maintenance script and having it run by 'cron'. The
script would just do a "DELETE FROM sessions WHERE session_date < ..."

-Doug

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #2

P: n/a
On Thu, Dec 18, 2003 at 17:05:30 -0500,
Melanie Bergeron <mb**********@globeecom.com> wrote:
Hi!

I am new with PostgreSQL and I want to know if this database give the
possibility to verify automatically, each night, if some records are
too old (by example, if session_date is older than a month) and if so
delete them.


The normal way to do that would be to run a daily cron job that deletes
all of the records with session date older than one month.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

P: n/a
Thanks for your help

Melanie


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.