The “userinfo” this message mentions is talking about the “User Information” field in the URL, so I think you are right that you’re using some characters in your password that are not allowed literally in URL syntax.
So apparently the valid characters you can write literally are:
“ALPHA”, which represents ASCII letters
“DIGIT”, which represents ASCII digits
Any of the following: -._~!$&'()*+,;=
If your password contains any other characters then you will need to use the pct-encoded production to escape them. For example, if you have an “at sign” @ in your password you would need to find its hexadecimal ASCII code (which for @ is 40 in hexadecimal) and write it after a percent symbol %, giving %40.
For example, if my password were b@dp@ssword then I would write it as:
I have not tested this with the Postgres backend in particular, but if it’s written correctly then it should decode those %40 sequences to recover the original @ symbols. If that doesn’t work then you may have found a bug in the backend, but we’ll see once you’ve tested.