-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160
> I am trying to connect to PostgreSQL with DBI on Mac OSX 10.8. ... > Is the server running locally and accepting > connections on Unix domain socket > "/var/pgsql_socket/.s.PGSQL.5432"? at ./dbipic2.pl line 41. This is probably caused by the socket directory not being where DBD::Pg thinks it is. Connect as psql and run this: show unix_socket_directory; (Or 'directories' for newer versions of Postgres) If that is not showing /var/pgsql_socket then you have half solved the problem. Next step is to figure out why the diconnect. The solution is to get Postgres to run in the "correct" directory, or to compile DBD::Pg to use the same socket directory as what Postgres is using. For a stopgap measure (and to test), you can specify the socket directory as the hostname in your connection string: just make sure it starts with a slash. For example: $dsn = "dbi:Pg:db=foobar;port=5432;host=/var/pgsql_socket"; $dbh = DBI->connect($dsn, $user, $pass, ...) You can also set the environment variable PGHOST for the same effect. - -- Greg Sabino Mullane g...@turnstep.com End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 201401101028 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAlLQEcUACgkQvJuQZxSWSsh9YwCffLuZiKvbSgYBtFNsZ+nLT1kv CxgAoMnB8VNccdg9EMjxF+XH8zreHu/4 =iIkZ -----END PGP SIGNATURE-----