pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: wieck@debis.com
To: gmerrall@email.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] timestamp/now in views
Date: Thu, 9 Dec 1999 16:18:33 +0100 (MET)
Message-ID: <m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <LPBBIEJIINGFPCAOHOMCIECBCFAA.gmerrall@email.com>

> 
> Sorry for being an idiot but I saw something similar to this in the docs but
> haven't been able to find it since.
> I tried creating a view using the following syntax
> CREATE VIEW prev_day AS SELECT * FROM audit WHERE audit_datetime >
> (current_timestamp - interval'24 hours');

    ... WHERE audit_datetime > 
				timestamp('now'::text) + '@24hours'::interval

	That one should work.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #




view thread (3+ messages)

Message-ID: <m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de

 · 

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: wieck@debis.com, gmerrall@email.com
  Subject: Re: [SQL] timestamp/now in views
  In-Reply-To: <m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de>
  References: <LPBBIEJIINGFPCAOHOMCIECBCFAA.gmerrall@email.com> <m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de>

* 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