pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petter Reinholdtsen <pere@hungry.com>
To: pgsql-sql@postgreSQL.org
Subject: 'now - 4 hours ago' ?
Date: Thu, 18 Jun 1998 19:26:24 +0200
Message-ID: <199806181726.TAA25534@sleeper.games.no> (raw)


I'm still learning SQL. :-)

Now I have upgraded my PostgreSQL database to v6.3.2, and have the
following table.

  CREATE TABLE testdate(
       received timestamp DEFAULT CURRENT_DATE,
       info text NOT NULL
       );

I want to select the info received (inserted) more then 4 hours ago.
How do I specify that in SQL?  Is timestamp the best datatype for this
kind of query?  Which date-types exists in PostgreSQL, and what is the
difference between them.  I'll be very happy to get pointers to good
intros. :-)

I'm not on this list, so please send copies to me.
-- 
##>  Petter Reinholdtsen <##    | pere@td.org.uit.no
 O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/    | Go Mozilla, go! Go!




view thread (3+ messages)  latest in thread

Message-ID: <199806181726.TAA25534@sleeper.games.no>
Permalink:  ../199806181726.TAA25534@sleeper.games.no/
Also on:    postgresql.org/message-id/199806181726.TAA25534@sleeper.games.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: pere@hungry.com
  Subject: Re: 'now - 4 hours ago' ?
  In-Reply-To: <199806181726.TAA25534@sleeper.games.no>
  References: <199806181726.TAA25534@sleeper.games.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox