commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This command drops all the sequences of the 'public' schema from the database.
First, it constructs a 'drop sequence' instruction for each table found in the schema, then it pipes the result to the psql interactive command.
See it scripted here : https://gist.github.com/cuberri/6868774#file-postgresql-drop-create-sh
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.