From: 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: Tue, 18 Mar 2003 19:19:50 +0100
Message-ID: <3E776346.4030306@klaster.net> (raw)
In-Reply-To: <1048010456.1151.105.camel@localhost.localdomain>
References: <1048010456.1151.105.camel@localhost.localdomain>
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
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: jasiek@klaster.net, cobalt@bearfruit.org
Subject: Re: showing records from the last 20 min
In-Reply-To: <3E776346.4030306@klaster.net>
* 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