Skip to content

Instantly share code, notes, and snippets.

@roberto-filho
Created March 25, 2014 12:31
Show Gist options
  • Save roberto-filho/9760903 to your computer and use it in GitHub Desktop.
Save roberto-filho/9760903 to your computer and use it in GitHub Desktop.
Query para dropar todos os usuários de uma base especificada pela query
SELECT pg_terminate_backend(pg_stat_activity.procpid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'gruberdev'
AND procpid <> pg_backend_pid();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment