Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.8.8/8.7.5) with ESMTP id NAA05334 for ; Fri, 19 Jun 1998 13:21:50 -0400 (EDT) Received: by bjke.com; id NAA06672; Fri, 19 Jun 1998 13:21:48 -0400 (EDT) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (3.2) id xmab05978; Fri, 19 Jun 98 13:21:11 -0400 Received: by cpsmail with Internet Mail Service (5.0.1458.49) id ; Fri, 19 Jun 1998 12:22:03 -0500 Message-ID: From: "Jackson, DeJuan" To: Zsolt Varga , Petter Reinholdtsen Cc: pgsql-sql@postgreSQL.org Subject: RE: [SQL] 'now - 4 hours ago' ? Date: Fri, 19 Jun 1998 12:22:01 -0500 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain > On Thu, 18 Jun 1998, Petter Reinholdtsen wrote: > > | CREATE TABLE testdate( > | received timestamp DEFAULT CURRENT_DATE, > | info text NOT NULL > | ); > > I think CURRENT_DATE will be parsed to the table creation's time. > so better to use: > > CREATE TABLE testdate ( > received timestamp DEFAULT timestamp(now()), > info text NOT NULL > ); > > Redax > DATETIME has more features and a wider range than TIMESTAMP, so if I were you that's what I'd be using. try: SELECT NOW()::DATETIME - '@4 hours'::TIMESPAN; I suggest sticking with DATETIME as much as you can. -DEJ