<div dir="ltr"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 1, 2015 at 6:25 PM, Neil Van Dyke <span dir="ltr"><<a href="mailto:neil@neilvandyke.org" target="_blank">neil@neilvandyke.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thomas Lynch wrote on 01/01/2015 03:30 AM:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am having difficulty connecting to the postgres server from Racket.  It asks for a password, but role and authentication is set up so that the logged in local user does not need one.<br>
<br>
</blockquote>
<br></span>
Is `psql` is using a Unix domain socket to talk to PG, `postgresql-connect` is using a `localhost` TCP port to PG, and your `/etc/postgresql/*/main/pg_<u></u>hba.conf` is configured to have different authentication for the two different methods?<br></blockquote><div><br></div><div>By gosh you are correct, this is the default for pg_hba.conf with the debian package install:</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If so, try either adding `#:socket 'guess` to your `postgresql-connect` call, or modifying your `pg_hba.conf` (and restarting PG).<br>
<br>
If that's not quite it, try also adding `#:ssl 'yes` to `postgresql-connect`, or modifying `pg_hba.conf` again.<br>
<br>
If that's not it, check for PG environment variables that `psql` could be using.  Also, you can test the different methods by supplying different `conninfo` strings on the `psql` command line.<br>
<br>
Neil V.<br>
<br>
</blockquote></div><br></div></div>