How can you get the active users connected to a postgreSQL database via SQL? This could be the userid\'s or number of users.
Using balexandre's info:
SELECT usesysid, usename FROM pg_stat_activity;