PostgreSQL – pg_settings
Dictionary/Catalog view. select * from pg_settings where category like ‘File%’
Dictionary/Catalog view. select * from pg_settings where category like ‘File%’
select * from pg_stat_activity where datname = ‘<dn_name>’;
postgresql – To Kill postgresql Sessions for a specific database Sometimes it is necessary for the database administrator to remove existing connected sessions. For example to drop a database when users and/or applications cannot (or…
Connect with the -E option psql -E ….. Then: postgres=# \du ********* QUERY ********** SELECT r.rolname, r.rolsuper, r.rolinherit, r.rolcreaterole, r.rolcreatedb, r.rolcanlogin, r.rolconnlimit, r.rolvaliduntil, ARRAY(SELECT b.rolname FROM pg_catalog.pg_auth_members m JOIN pg_catalog.pg_roles b ON (m.roleid = b.oid)…
psql is the PostgreSQL interactive terminal. Usage: psql [OPTION]… [DBNAME [USERNAME]] General options: -c, –command=COMMAND run only single command (SQL or internal) and exit -d, –dbname=DBNAME database name to connect to (default: “RAYFOX”) -f, –file=FILENAME…