How can you get the active users connected to a postgreSQL database via SQL?

(question) Don’t you get that info in select * from pg_user; or using the view pg_stat_activity: select * from pg_stat_activity; Added: the view says: One row per server process, showing database OID, database name, process ID, user OID, user name, current query, query’s waiting status, time at which the current query began execution, time at … Read more