Re: [SQL] Best way to delete time stamped data?

From: Kyle <kyle(at)ccidomain(dot)com>
To: Forum - PostGreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: [SQL] Best way to delete time stamped data?
Date: 2003-05-04 13:09:05
Message-ID: 3EB510F1.8090708@ccidomain.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Josh,

Thanks, even my boss can read the new statement:

DELETE FROM ONLY richtable WHERE age(trxdate) > '90 days';

Your disparaging aside, that is exactly the kind of expression
compaction I was after! :)

And yeah, I have a deep PERL background, but that's not a bad thing.

-Kyle

Josh Berkus wrote:
> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2003-05-04 16:30:29 Re: [SQL] Best way to delete time stamped data?
Previous Message Jean-Michel POURE 2003-05-03 15:13:30 Re: [HACKERS] Join Stallman and Software SMEs to refuse sofware patents

Browse pgsql-sql by date

  From Date Subject
Next Message Jim C. Nasby 2003-05-04 16:30:29 Re: [SQL] Best way to delete time stamped data?
Previous Message Rajesh Kumar Mallah 2003-05-04 10:47:04 Re: timeofday() and now() issue..