Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Postgres without SSL? #6

Closed
prashnts opened this issue Mar 3, 2017 · 4 comments
Closed

Allow Postgres without SSL? #6

prashnts opened this issue Mar 3, 2017 · 4 comments

Comments

@prashnts
Copy link

prashnts commented Mar 3, 2017

In my local dev setup, SSL is not enabled in PG. It throws this error, in this case:

usql pg://localhost/agoranhs
Type "help" for help.

pg:localhost/agoranhs=> select * from events limit 2;
error: pq: SSL is not enabled on the server
pg:localhost/agoranhs=> ^D
@kenshaw
Copy link
Member

kenshaw commented Mar 3, 2017

You need to pass the 'sslmode=disable' in the URL:

usql 'postgres://localhost/dbname?sslmode=disable'

This is due to the way that the lib/pq PostgreSQL driver handles SSL connections. Please see here: https://github.com/lib/pq

@berdon
Copy link

berdon commented Sep 20, 2018

Can we add this to the readme.md? Otherwise this is pretty lost to newcomers.

@eadmaster
Copy link

another way to handle this would be appending an s in the protocol name (e.g. pgs)

@kid1412621
Copy link

You need to pass the 'sslmode=disable' in the URL:

usql 'postgres://localhost/dbname?sslmode=disable'

This is due to the way that the lib/pq PostgreSQL driver handles SSL connections. Please see here: https://github.com/lib/pq

is there anyway to disable it by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants