Created
April 6, 2017 00:55
-
-
Save mattmc3/4e96bfc437393cca2a89f386f9aa08e1 to your computer and use it in GitHub Desktop.
Postgres drop database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select pg_terminate_backend(pid) from pg_stat_activity where datname='$DB_NAME'; | |
DROP DATABASE "$DB_NAME"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment