julmon/pg_activity — pull request #24 by gurneyalex (2013-07-08 09:05:49+00:00)
Title: try to use a UNIX Socket connection if host is localhost

This allows to avoid using the PGPASSWORD environment variable
or a .pgpass file if ident / peer authentication is supported.

It makes it possible to run "sudo su postgres -c pg_activity" on an Ubuntu machine with the default setup