For postgresql postgresql://%2Fvar%2Flib%2Fpostgresql/dbname is a valid DSN when connecting to a UNIX socket. It is actually not valid to not url encode the / (see https://www.postgresql.org/docs/10/libpq-connect.html)
It is also possible to specify the path as a paramter without encoding it: postgresql:///dbname?host=/var/lib/postgresql
It would be great if the parsed DSN decoded that as well re-encoded it when doing geturl.
For postgresql
postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
is a valid DSN when connecting to a UNIX socket. It is actually not valid to not url encode the/
(see https://www.postgresql.org/docs/10/libpq-connect.html)It is also possible to specify the path as a paramter without encoding it:
postgresql:///dbname?host=/var/lib/postgresql
It would be great if the parsed DSN decoded that as well re-encoded it when doing
geturl
.