X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0336147631A for ; Fri, 2 May 2003 18:06:33 -0400 (EDT) Received: from otbnetworks.com (unknown [65.207.140.5]) by postgresql.org (Postfix) with ESMTP id 32AA947644E for ; Fri, 2 May 2003 18:06:30 -0400 (EDT) Received: from ccidomain.com ([10.10.10.2]) (authenticated) by otbnetworks.com (8.11.6/8.11.6) with ESMTP id h42M5g921582 for ; Fri, 2 May 2003 18:05:42 -0400 Message-ID: <3EB2EBF0.8010003@ccidomain.com> Date: Fri, 02 May 2003 18:06:40 -0400 From: Kyle Organization: Creative Connections, Inc. User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Forum - PostGreSQL SQL Subject: Best way to delete time stamped data? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-12.9 required=5.0 tests=BAYES_01,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/34 X-Sequence-Number: 13199 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