Re: Best way to delete time stamped data?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Best way to delete time stamped data?
Дата
Msg-id 200305021619.41879.josh@agliodbs.com
обсуждение исходный текст
Ответ на Best way to delete time stamped data?  (Kyle <kyle@ccidomain.com>)
Ответы Re: Best way to delete time stamped data?
Список pgsql-sql
Kyle,

> 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)

More compact than that ?!?!?!
Maybe you should go into Perl, instead of SQL -- I think the one-liners would
suit you.

You can use the age() function, but all that funciton does is the same
calculation you have above.

--
-Josh BerkusAglio Database SolutionsSan Francisco



В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Time formating
Следующее
От: "A.Bhuvaneswaran"
Дата:
Сообщение: Re: timeofday() and now() issue..