Timestamps - Mailing list pgsql-hackers

From Slavisa Garic
Subject Timestamps
Date
Msg-id Pine.GSO.4.10.10402091729010.29934-100000@bruce.csse.monash.edu.au
Whole thread Raw
In response to Re: Transaction aborts on syntax error.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Timestamps  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Hi all,

I am not sure if this should be sent to this mailing list. If i am wrong
could someone please direct me to the correct one so I can subscribe
there.

I wanted to ask a simple question. Say I have a table with the timestamp
field. What is the best way to say get all the records that were created
say 2 hours before the query. One of the options would be to generate the
timestamp in the correct format and then send a query in the format 
SELECT * from <table> where create_time < <generated_timestamp>

Is there a better way than this?

Any help would be greatly appreciated,
Regards,
Slavisa




pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: session persistent data for plperl
Next
From: Tom Lane
Date:
Subject: Re: psql variables