Created
September 11, 2013 04:35
-
-
Save fepa/6519386 to your computer and use it in GitHub Desktop.
A snippet to drop in .bashrc to make life easier when restoring PostgreSQL dump files to a database on localhost.
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
function pglocal { | |
if [ "$1" = "" ]; then | |
echo "Run like this:" | |
echo "pglocal USER DATABASE PATH/TO/FILE" | |
else | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -$ | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment