Closed
Description
Hi,
I want to connect to my PostgreSQL server:
Host: 127.0.0.1
Port: 5432
User: postgres
Password: mypass12#
Database: postgres
When I use the following connect:
conn, err := pgx.Connect(context.Background(), "postgres://postgres:mypass12#@127.0.0.1:5432/postgres")
I get this error
Unable to connect to database: cannot parse
postgres://postgres:[email protected]:5432/postgres: failed to parse as URL (parse "postgres://postgres:mypass12": invalid port ":mypass12" after host)
The error seems to appear when using "#" as a character for the password.
The same connect string works just fine when using it with psql:
psql postgres://postgres:mypass12#@127.0.0.1:5432/postgres
Metadata
Metadata
Assignees
Labels
No labels