Search Postgresql Archives

Re: Forcing INTERVAL days display, even if the interval is less than one day

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Could just use a CASE for that particular case:

CASE WHEN now()-latest_vacuum < '1 day'
           THEN '0 days '
           ELSE '' END
           || DATE_TRUNC('second', now()-latest_vacuum) AS vacuumed_ago

Cheers,
Greg


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux