Created
October 29, 2013 23:42
-
-
Save goldsmith/7224712 to your computer and use it in GitHub Desktop.
A short shell program to add all Postgres commands in the default Mac OS X PostgreSQL to your $PATH. This probably will be done automatically, so check before running it.
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
# replace 9.3 with whatever version of PostgreSQL you have installed | |
# you can also link the commands to /usr/bin/ if you prefer | |
# before | |
######## | |
# $ psql | |
# -bash: psql: command not found | |
for i in /Library/PostgreSQL/9.3/bin/*; do | |
t=${i##*/}; | |
ln -s "$i" /usr/local/bin/"${t%.*}" | |
done | |
# after | |
####### | |
# $ sudo -u postgres psql | |
# Password: | |
# psql (9.3.1) | |
# Type "help" for help. | |
# | |
# postgres=# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1