Re: showing records from the last 20 min
От
Tomasz Myrta
Тема
Re: showing records from the last 20 min
Дата
Msg-id
3E776346.4030306@klaster.net
Ответ на
showing records from the last 20 min (Matthew Nuzum)
Список
Дерево обсуждения
showing records from the last 20 min Matthew Nuzum <cobalt@bearfruit.org>
Re: showing records from the last 20 min Tomasz Myrta <jasiek@klaster.net>
Re: showing records from the last 20 min Matthew Nuzum <cobalt@bearfruit.org>
Re: showing records from the last 20 min Rajesh Kumar Mallah <mallah@trade-india.com>
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
В списке pgsql-sql по дате отправления