Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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