Re: Best way to delete time stamped data?
| От | Steve Crawford |
|---|---|
| Тема | Re: Best way to delete time stamped data? |
| Дата | |
| Msg-id | 20030502225153.9AC1F103C7@polaris.pinpointresearch.com обсуждение исходный текст |
| Ответ на | Best way to delete time stamped data? (Kyle <kyle@ccidomain.com>) |
| Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: