lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
9.13k stars 911 forks source link

sslmode=allow sslmode=prefer #776

Open arvenil opened 6 years ago

arvenil commented 6 years ago

Hi, what stops this driver from supporting sslmode=allow or sslmode=prefer?

daniellockard commented 6 years ago

Nothing other than it isn't implemented, from what I can see.

msakrejda commented 6 years ago

See discussion in https://github.com/lib/pq/pull/175 for prefer

almereyda commented 1 year ago

This discussion is not really telling. What was the argument against supporting Postgres features in this Postgres library again?

Also it could be nice if the default here would mimic upstream in choosing to fall back to an insecure connection, if no secure connection is available.

prefer is also discussed in

johto commented 1 year ago

This discussion is not really telling. What was the argument against supporting Postgres features in this Postgres library again?

This discussion is about libpq features, not postgres features.

My complaint was that what was implemented in that PR was not really libpq's prefer mode, but something else that's not in any other client library as far as I know. I think that complaint is still valid.

Also it could be nice if the default here would mimic upstream in choosing to fall back to an insecure connection, if no secure connection is available.

I don't really know. I don't think I'm the only one who thinks that's a bad default. But even worse, a lot of people might be relying on pq's default being what it's been the past 10+ years.