From: | "Lonni J Friedman" <netllama(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | querying the age of a row |
Date: | 2007-06-07 17:47:34 |
Message-ID: | 7c1574a90706071047x773c7085yf0d9f100dbca51da@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings,
I've got a PostgreSQL-8.1.x database on a Linux box. I have a need to
determine which rows in a specific table are less than 24 hours old.
I've tried (and failed) to do this with the age() function. From what
I can tell, age() only has granularity down to days, and seems to
assume that anything matching today's date is less than 24 hours old,
even if there are rows from yesterday's date that existed less than 24
hours ago.
I've googled on this off and on for a few days, and have come up dry.
At any rate, is there a reliable way of querying a table for rows
which have existed for a specific period of time?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama(at)gmail(dot)com
LlamaLand http://netllama.linux-sxs.org
From | Date | Subject | |
---|---|---|---|
Next Message | Campbell, Lance | 2007-06-07 17:49:19 | Re: subtract a day from the NOW function |
Previous Message | Michael Glaesemann | 2007-06-07 17:27:03 | Re: subtract a day from the NOW function |