database - Postgres.app setup: getting `which psql` to return desired path -


i installed postgres.app, , which psql returns nothing. followed instructions listed on postgres site; here's did:

1) dragged old version of postgres trash. emptied trash.

2) downloaded current version of postgres.app. dragged applications folder.

3) restarted terminal.

the output i'm looking which psql like: /applications/postgres.app/contents/versions/9.3/bin/psql

when run brew install postgresql followed which psql, /usr/local/bin/psql. @ least something, it's not want.

in case it's useful, here's .bashrc:

if [ -f ~/.bash_profile ];     source ~/.bash_profile fi  path="/applications/postgres.app/contents/macos/bin:$path" export dyld_library_path="/applications/postgres.app/contents/macos/lib:$dyld_library_path"  ### added heroku toolbelt export path="/usr/local/heroku/bin:$path"  rvm stable --auto-dotfiles  export path="$path:$home/.rvm/bin" # add rvm path scripting 

and .bash_profile:

export path=/usr/local/bin:$path export path=/usr/local/share/python:$path  # python export workon_home=$home/.virtualenvs export virtualenvwrapper_python=/usr/local/bin/python2.7 export virtualenvwrapper_virtualenv_args='--no-site-packages' export pip_virtualenv_base=$workon_home export pip_respect_virtualenv=true if [[ -r /usr/local/share/python/virtualenvwrapper.sh ]];     source /usr/local/share/python/virtualenvwrapper.sh else     echo "warning: can't find virtualenvwrapper.sh" fi  export ps1="\h:\w \u\$ "  # git less="-qrx -p %lt" export less  # colorize shell output export clicolor=1 export lscolors=hxfxcxdxbxegedabagacad  #========== aliases ===========  alias u="cd .." alias uu="cd ../.." alias uuu="cd ../../.." alias cd..="cd .." alias rm="rm -i" alias ll="ls -lafgh" alias ls="ls -fgh" alias new="ls -lat | head -15"  # node needs not have dyld_library_path set alias node="dyld_library_path=''; node"  # postgres stuff path="/applications/postgres.app/contents/macos/bin:$path" export dyld_library_path="/applications/postgres.app/contents/macos/lib:$dyld_library_path"  [[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm" # load rvm shell session *as function* 

many thanks!

a solution! posterity, here's worked me:

1) add line export path=$path:/applications/postgres.app/contents/versions/9.4/bin .bash_profile. further reading, found solution on postgres.app command line tools page.

2) run brew uninstall postgresql. seems suboptimal, i'll want later, before uninstalling, path brew-installed postgresql got when ran which psql.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -