From: Kyle <kyle@ccidomain.com>
To: Forum - PostGreSQL SQL <pgsql-sql@postgresql.org>
Subject: Best way to delete time stamped data?
Date: Fri, 02 May 2003 18:06:40 -0400
Message-ID: <3EB2EBF0.8010003@ccidomain.com> (raw)
Hello. I have a table that contains time stamped data. To delete rows
that are over 90 days old, I do this:
DELETE FROM ONLY richtable WHERE trxdate < current_timestamp - interval
'90 days';
This works great. But I was wondering if there is a better or more
compact way to go about it. (this method feels "clunky" to me)
Thanks.
-Kyle
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: kyle@ccidomain.com
Subject: Re: Best way to delete time stamped data?
In-Reply-To: <3EB2EBF0.8010003@ccidomain.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