SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'TARGET_DB' AND pid <> pg_backend_pid();
Last active
August 16, 2016 17:48
-
-
Save isccarrasco/4072bd2ef1276948fce5 to your computer and use it in GitHub Desktop.
Disconnect User from a database on PostgreSQL.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment