X-Original-To: pgsql-sql@postgresql.org Received: from ms-smtp-01.tampabay.rr.com (ms-smtp-01.tampabay.rr.com [65.32.1.43]) by postgresql.org (Postfix) with ESMTP id 02945476285 for ; Tue, 18 Mar 2003 13:35:28 -0500 (EST) Received: from [192.168.0.105] (169-52.34-65.tampabay.rr.com [65.34.52.169]) by ms-smtp-01.tampabay.rr.com (8.12.5/8.12.5) with ESMTP id h2IIZ414009749; Tue, 18 Mar 2003 13:35:10 -0500 (EST) Subject: Re: showing records from the last 20 min From: Matthew Nuzum To: Tomasz Myrta Cc: Postgres SQL In-Reply-To: <3E776346.4030306@klaster.net> References: <1048010456.1151.105.camel@localhost.localdomain> <3E776346.4030306@klaster.net> Content-Type: text/plain Organization: Bearfruit.org Message-Id: <1048012590.1151.116.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 (1.2.1-1) Date: 18 Mar 2003 13:36:30 -0500 Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/444 X-Sequence-Number: 12483 On Tue, 2003-03-18 at 13:19, Tomasz Myrta wrote: > > 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'; > Did you mean: > select * from sys_logins > WHERE tstamp >= now()-cast('20:00' as interval); Yes, I guess I did. ;-) Thanks for the help. -- Matthew Nuzum cobalt@bearfruit.org www.bearfruit.org