pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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




view thread (8+ messages)  latest in thread

Message-ID: <3EB2EBF0.8010003@ccidomain.com>
Permalink:  ../3EB2EBF0.8010003@ccidomain.com/
Also on:    postgresql.org/message-id/3EB2EBF0.8010003@ccidomain.com

 · 

reply

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