Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to encrypt the connection established with M-x sql-postgres in Emacs? If so, how?

share|improve this question

migrated from stackoverflow.com May 6 '11 at 11:11

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

sql-postgres uses psql, so you can use whatever psql and libpq accept. You could for example set the environment variable PGSSLMODE=require.

There might be a better way, but the sql-mode in Emacs is pretty ancient with respect to PostgreSQL support.

share|improve this answer
2  
Also note that psql will helpfully print out SSL connection after starting, which sql-mode will echo. This makes it easy to confirm it's connected securely. – ataylor May 4 '11 at 17:18
    
Thanks for the replies. This is what I was looking for. – SabreWolfy May 4 '11 at 18:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .