Rikard Bosnjakovic wrote on 24.01.2010 11:08:
> I want to compare these times to the actual (current) time + 45
> seconds. If the current time + 45 seconds is higher than the time in
> the table, I want "true". First, I tried this:
>
> # select times, times> now()::time AS time_compare from live_stats;
[...]
> Which works, but I don't know how to apply the "45 seconds":
>
> # select times, times> (now()::time + '45 seconds') AS time_compare
> from live_stats;
You need to add an interval.
This should work:
SELECT times, times > (now()::time + interval '45' second) as time_compare
FROM live_stats;
Regards
Thomas