X-Original-To: pgsql-sql@postgresql.org Received: from trade-india.com (ns5.trade-india.com [66.234.10.13]) by postgresql.org (Postfix) with SMTP id 988EA47617D for ; Tue, 18 Mar 2003 23:59:14 -0500 (EST) Received: (qmail 14942 invoked by uid 505); 19 Mar 2003 04:59:06 -0000 Received: from mallah@trade-india.com by ns5.trade-india.com by uid 502 with qmail-scanner-1.15 (uvscan: v4.1.60/v4171. Clear:. Processed in 1.845013 secs); 19 Mar 2003 04:59:06 -0000 Received: from mail-relay.trade-india.com (HELO system67.trade-india-local.com) (203.196.129.235) by ns5.trade-india.com with SMTP; 19 Mar 2003 04:59:03 -0000 From: Rajesh Kumar Mallah Organization: Infocom Network Limited To: Tomasz Myrta , Matthew Nuzum Subject: Re: showing records from the last 20 min Date: Wed, 19 Mar 2003 10:29:17 +0530 User-Agent: KMail/1.5 Cc: Postgres SQL References: <1048010456.1151.105.camel@localhost.localdomain> <3E776346.4030306@klaster.net> In-Reply-To: <3E776346.4030306@klaster.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200303191029.17542.mallah@trade-india.com> X-Archive-Number: 200303/447 X-Sequence-Number: 12486 the age function can also be used i guess. where age(tstamp) < '20 mins'::interval=20 regds mallah. On Tuesday 18 Mar 2003 11:49 pm, Tomasz Myrta wrote: > U=BFytkownik Matthew Nuzum napisa=B3: > > 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. > >=20 > > I want to show all the records in a table that occurred in the last 20 > > min. > >=20 > > So, maybe something like: > > select * from sys_logins WHERE tstamp >=3D now() - '00:20'; > >=20 > > on pg 7.3.2 this produces the error: > > ERROR: Bad timestamp external representation '00:20' > >=20=20 > > Thanks for any help, > Did you mean: > select * from sys_logins > WHERE tstamp >=3D now()-cast('20:00' as interval); > ? >=20 > Regards, > Tomasz Myrta >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? >=20 > http://archives.postgresql.org >=20 >=20 --=20 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.