Search Postgresql Archives

Greatest of a list of columns?

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

 



Postgresql 12.5


What's the canonical Postgresql method for doing, for example, this?
SELECT relname, MAXOF(last_vacuum, last_autovacuum)
FROM pg_stat_user_tables;

Seeing both last_vacuum and last_autovacuum is useful, of course, but sometimes I only want to see the "really" last time it was vacuumed.

I can hard code a case statement, but a generic multi-column solution is preferred.

Thanks

--
Angular momentum makes the world go 'round.





[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