pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah@trade-india.com>
To: Tomasz Myrta <jasiek@klaster.net>
To: Matthew Nuzum <cobalt@bearfruit.org>
Cc: Postgres SQL <pgsql-sql@postgresql.org>
Subject: Re: showing records from the last 20 min
Date: Wed, 19 Mar 2003 10:29:17 +0530
Message-ID: <200303191029.17542.mallah@trade-india.com> (raw)
In-Reply-To: <3E776346.4030306@klaster.net>
References: <1048010456.1151.105.camel@localhost.localdomain>
	<3E776346.4030306@klaster.net>



the age function can also be used i guess.

where age(tstamp) <  '20 mins'::interval 


regds
mallah.

On Tuesday 18 Mar 2003 11:49 pm, Tomasz Myrta wrote:
> Użytkownik Matthew Nuzum napisał:
> > I know this is such a simple question, but I can't find the answer in
> > the manual and I've tried very hard to find it.
> > 
> > I want to show all the records in a table that occurred in the last 20
> > min.
> > 
> > So, maybe something like:
> > select * from sys_logins WHERE tstamp >= now() - '00:20';
> > 
> > on pg 7.3.2 this produces the error:
> > ERROR:  Bad timestamp external representation '00:20'
> >  
> > Thanks for any help,
> Did you mean:
> select * from sys_logins
> WHERE tstamp >= now()-cast('20:00' as interval);
> ?
> 
> Regards,
> Tomasz Myrta
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 
> 

-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



view thread (4+ messages)

Message-ID: <200303191029.17542.mallah@trade-india.com>
Permalink:  ../200303191029.17542.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200303191029.17542.mallah@trade-india.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com, jasiek@klaster.net, cobalt@bearfruit.org
  Subject: Re: showing records from the last 20 min
  In-Reply-To: <200303191029.17542.mallah@trade-india.com>

* 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