Limit record count

From: "Sean Z(dot)" <sean09182006(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Limit record count
Date: 2007-12-17 22:02:57
Message-ID: 229478.80511.qm@web45105.mail.sp1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I need to write a maintenance function to delete oldest records of a table, leaving only a certain number of records, say 50. The task should run once per day. How can I write it?
The oldest record carries the smallest ID.

Thanks a lot!
Sean

____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2007-12-17 22:24:05 Re: spreadsheet interface
Previous Message Joshua D. Drake 2007-12-17 22:00:28 Re: install problem