I have a postgresql database in Azure
The passwd string has special characters like these:
)mvd99/iyH_=ag=Por/W}%%aKY^ygt+,sC7%%P?APOU
psql --dbname=postgresql://db_user@mydemoserver:)mvd99/iyH_=ag=Por/W}%%aKY^ygt+,sC7%%P?APOU@mydemoserver.postgres.database.azure.com:5432/mydb
when executing the psql command, it shows me in following error:
psql: invalid percent-encoded token: "iyH_=ag=Por/W}%%aKY^ygt+,sC7%%P"
I already tried putting the passwd string in quotation marks but it does not work
What other options do I have?
I can not change the passwd
I'm interested in using the psql client, because I have to do very large backups
Best Answer
You have to use URI escapes for all problematic characters.
For this user:
You can login like this:
The documentation has it: