./pgweb_darwin_amd64 --url=postgresql://myhost:5433/mydb
Connecting to server...
Error: missing "=" after "postgresql://myhost:5433/mydb" in connection info string"
Admittedly, it is documented that URLs start with postgres:, not postgresql:, but it's an easy mistake to make, because libpq supports both. But in any case it shouldn't attempt to interpret a URL it cannot parse as a connection string and then give a bogus error message.
Next try:
./pgweb_darwin_amd64 --url=postgres://myhost:5433/mydb
Connecting to server...
Error: pq: SSL is not enabled on the server
I know the Go lib/pq is very particular about SSL, but the help does indicate that it is off by default:
OK, so maybe in order to be able to set the SSL option, I cannot use URLs. Next try:
./pgweb_darwin_amd64 --host=myhost --port=5433 --db=mydb --ssl=disable
Connecting to server...
Error: pq: LDAP authentication failed for user "postgres"
So that worked, but why does it default the user to "postgres"? It ought default to my current user name.
Anyway, next try:
./pgweb_darwin_amd64 --host=myhost --port=5433 --db=mydb --ssl=disable --user="Peter Eisentraut"
Connecting to server...
Error: missing "=" after "Eisentraut" in connection info string"
So apparently it needs some quoting when it assembles the connection string?
This looks really cool, but I can't connect.
First attempt:
Admittedly, it is documented that URLs start with
postgres:
, notpostgresql:
, but it's an easy mistake to make, because libpq supports both. But in any case it shouldn't attempt to interpret a URL it cannot parse as a connection string and then give a bogus error message.Next try:
I know the Go
lib/pq
is very particular about SSL, but the help does indicate that it is off by default:But nothing of the sort
works.
OK, so maybe in order to be able to set the SSL option, I cannot use URLs. Next try:
So that worked, but why does it default the user to "postgres"? It ought default to my current user name.
Anyway, next try:
So apparently it needs some quoting when it assembles the connection string?