0

I'm sure this will become a more and more relevant question as the advent of Docker's reign comes to fruition (Hail the whale!). I've isolated my Postgres instance to a Docker container for development purposes. I hate actually creating users on my system, and having to go kill start up commands that I didn't really want.

Now my problem is, I'm trying to work with Ecto and Ecto needs psql to do what it does. How do I install psql and not the whole elephant? I imagine the best answer would tackle Linux, Windows, and Mac, but I'm most interested in Mac OS X as there doesn't seem to be a brew formula for installing just psql.

Breedly
  • 12,838
  • 13
  • 59
  • 83
  • I've already installed a full-blown postgres server on my machine, so I can't verify, but this page http://www.postgresql.org/download/macosx/ claims that the psql commandline is pre-installed on OS X server 10.7+, and since Apple's merged OS X server into the normal OS (plus some extra apps which can be installed as a bundle), maybe it's pre-installed already? – Dave May 02 '16 at 14:00
  • For Windows, see here: http://stackoverflow.com/q/33854798/330315 you can use essentially the same approach for Linux and OS-X as well as long as you don't need this through their package managers –  May 02 '16 at 14:36
  • Would ssh to the docker image and then plsq help Breddly ? –  May 02 '16 at 14:41
  • @pnorton I'm afraid not, as Ecto requires psql to be in the path. Perhaps a different question could be how to meet psql dependency specifically for Ecto. I saw some stuff about ODBC drivers, but didn't really know what those were. – Breedly May 02 '16 at 15:56
  • Hi @Breedly Hmm tricky. You could try this then Search for -> odbc.ini http://www.postgresql.org/message-id/3C68E705.5060806@itek.norut.no This is a linux installation using odbc. You could hack it. This could help too https://odbc.postgresql.org/docs/unix-compilation.html –  May 02 '16 at 16:07

0 Answers0