Skip to content

postgresql – Kill Sessions

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… 

postgresql – show sql commands behind shortcuts

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)… 

postgresql – help

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…