0

My PostgreSQL authenticates using Unix Domain Sockets (Trust Authentication). When I run psql I do not need a password to connect to the database.

But when I run sql-postgres, I am always asked for a password. How can I tell Emacs, that I have no password?

  • How does psql know the socket to use? (echo $PGPORT might tell you think if you don't know.) – Realraptor Apr 17 at 20:14
1

Sorry but I got it myself.

I had to set server to /var/run/postgresql in the customization of sql-postgres-login-params.

'(sql-postgres-login-params
  (quote
   ((user :default "xxx")
    (server :default "/var/run/postgresql")
    (database :default "xxx"))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.