URL encode using jq
May 22, 2025
When using pgcli and if want to use -D <alias_dsn> if your password is using special characters, you can use jq to URL encode the password.
echo -n 'My@Secure:Pa$$word' | jq -Rr @uri
When using pgcli and if want to use -D <alias_dsn> if your password is using special characters, you can use jq to URL encode the password.
echo -n 'My@Secure:Pa$$word' | jq -Rr @uri