PostgreSQL connection string special character issues
Open
- Dominant language
- Go
- Stars
- 190
- Forks
- 65
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 10
Description
Hi I'm having an issue connecting to a PostgreSQL SB where the password contains special characters.
if my password is abc#123, and I create a connection string like:
`postgres://myusername:abc%23123@db.host/mydb`
where **#** is escaped to be **%23** as required by PostgreSQL. I get the following error when I try to connect:
`const db = sql.open('postgres', 'postgres://myusername:abc%23123@db.host/mydb');`
`ERRO[0005] GoError: parse "postgres://myusername:abc%!?(MISSING)k@db.host/mydb": invalid port ":abc%!"(MISSING) after host`
How should can I connect to PostgreSQL DBs where a password contains a special character? Please help.
Contributor guide
Assessment
This issue has not been assessed yet.