which psql > /dev/null || return 0
+
+pg_pgpass_sql() {
+ local quote="'"
+ awk -F: '/^[:alpha:\*]/{print "ALTER USER "$4" WITH PASSWORD '$quote'"$5"'$quote';"}' ~/.pgpass
+}
+
pg_count() {
declare dbs pwd tables length
,(SELECT MAX(hb.val) FROM host_info hb WHERE hb.key LIKE CONCAT('backup_servers.',hi.host,'.files_transfer')) as backup_files
FROM host_info hi
GROUP BY host
- ORDER BY git_updated DESC,backup_updated DESC,host
+ORDER BY git_updated DESC,backup_updated DESC,host
;
GRANT ALL PRIVILEGES ON host_report TO nico;
+GRANT ALL PRIVILEGES ON host_report TO icolas;
GRANT ALL PRIVILEGES ON host_report TO www;
GRANT ALL PRIVILEGES ON host_report TO root;