Skip to content

Instantly share code, notes, and snippets.

@mtunjic
Created March 26, 2019 16:32
Show Gist options
  • Save mtunjic/08fb74a4ffa0ff1c91d5927723e4a455 to your computer and use it in GitHub Desktop.
Save mtunjic/08fb74a4ffa0ff1c91d5927723e4a455 to your computer and use it in GitHub Desktop.
psql environment
\pset null 'NULL'
\encoding latin1
\set PROMPT1 '%n@%M:%>%x %/# '
\pset pager always
\timing on
\set qstats92 '
SELECT usename, datname, left(query,100) || ''...'' As query
FROM pg_stat_activity WHERE state != ''idle'' ;
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment