I didn't find much out there on PostgreSQL drivers for Erlang. There's one built into jungerl, and one put out by Erlang Consulting, as far as I can tell. I can't stand CVS, there's no package download, and didn't already have jungerl or its 'pgsql' driver anywhere on my local, so I moved on to the Erlang Consulting 'psql' driver, which had a tarball.
after untarring in ~/dev/erlang/psql-0.1.3, I just typed 'make' and the /ebin folder filled nicely (i.e. my Erlang is working)
So, under the /docs folder, in overview.edoc, it said to modify sys.config (a file usually in $ERL_OTP_ROOT/releases/$VERSION) and add in your connection strings like such:
{psql, [{default, {"192.168.1.101", 5432, "dev", "secret", "sql_test"}},
{pools, [{default, 1}]}]}
I now think this is a bit dated, because the following code gave me a bit of a connection error during startup of the driver.
make_dat_files() ->
ensure_started(psql),
Pid = psql:allocate(),
psql:sql_query(Pid, "select * from accounts;").
Config stuffies seem to have moved into the psql.app file in /ebin, but you don't edit that directly. I found ~/dev/erlang/psql-0.1.3/src/psql.app.src, modified for my specific connection settings, and back at the root of the tarball, typed 'make' again. Now, the psql.app file in /ebin had my connection info and I could go about my business.
I'm still very much a newb, but articles like this one would have saved me an hour on this issue, so enjoy.