Answers for "view sessions using db in postgres"

SQL
1

psql connections

SELECT * FROM pg_stat_activity;
Posted by: Guest on August-17-2020
0

postgresql print sessions using the database

select pid as process_id, 
       usename as username, 
       datname as database_name, 
       client_addr as client_address, 
       application_name,
       backend_start,
       state,
       state_change
from pg_stat_activity;
Posted by: Guest on March-10-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language