I'm usually lazy and let automatic casting work for me:
DELETE FROM ONLY richtable WHERE now()-trxdate > '90 days';
Cheers,
Steve
On Friday 02 May 2003 3:06 pm, Kyle wrote:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly