subtratcing dates

Поиск
Список
Период
Сортировка
От Fran Fabrizio
Тема subtratcing dates
Дата
Msg-id 3AF32443.CB2E50FE@exchange.webmd.net
обсуждение исходный текст
Ответы Re: subtratcing dates  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello all,

I have a table that has two columns, tstamp of type timestamp, and limit
of type int.

I want to have a query that tells me whether or not the timestamp is
within 'limit' minutes of the current time.

so, something like:

select tstamp > now() + '-60 minute' from log;

except i need the 60 to be the value of the 'limit' column instead so...

select tstamp > now() + '-limit minute' from log;

which of course doesn't work.  I can't seem to get it right no matter
what I try.  Any ideas?  Thanks!

-Fran


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: commit_delay CANCEL
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: delete with cascade