X-Original-To: pgsql-sql@postgresql.org Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 7E2B9475FBA for ; Tue, 18 Mar 2003 13:18:58 -0500 (EST) Received: from klaster.net (pa59.krakow.cvx.ppp.tpnet.pl [213.76.36.59]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id CB6F26A1AF; Tue, 18 Mar 2003 19:18:47 +0100 (CET) Message-ID: <3E776346.4030306@klaster.net> Date: Tue, 18 Mar 2003 19:19:50 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.3) Gecko/20030312 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Matthew Nuzum Cc: Postgres SQL Subject: Re: showing records from the last 20 min References: <1048010456.1151.105.camel@localhost.localdomain> In-Reply-To: <1048010456.1151.105.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Archive-Number: 200303/443 X-Sequence-Number: 12482 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