Created
March 11, 2014 15:43
-
-
Save dijit/9488439 to your computer and use it in GitHub Desktop.
Drop all sequences (pgsql)
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
for i in $( sudo -u postgres psql -q -t -d firebox\ | |
-c "SELECT 'drop sequence ' || c.relname || ';' \ | |
FROM pg_class c WHERE (c.relkind = 'S');" ); do | |
sudo -u postgres psql -d firebox -c "$i"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment