Skip to content

Instantly share code, notes, and snippets.

@goldsmith
Created October 29, 2013 23:42
Show Gist options
  • Save goldsmith/7224712 to your computer and use it in GitHub Desktop.
Save goldsmith/7224712 to your computer and use it in GitHub Desktop.

Revisions

  1. goldsmith created this gist Oct 29, 2013.
    21 changes: 21 additions & 0 deletions postgres_path.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # 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=#