@victorlin Are you sure this current implementation works? While the funky quoting does seem to correctly allow single quotes within single quoted strings in bash

```
/bin/bash
echo 'ALTER ROLE postgres ENCRYPTED PASSWORD '"'"'YOU_CANNOT_BREAK_THIS_SUPER_$PWD'"'"';'
> ALTER ROLE postgres ENCRYPTED PASSWORD 'YOU_CANNOT_BREAK_THIS_SUPER_$PWD';
```

However when testing the fix with the Vagrantfile you setup at https://github.com/victorlin/postgresql/commit/498abef02f3a04e0d15e0100457c26872ad8ef96 I still can't connect via the psql CLI (e.g. running `psql` as the vagrant user followed by pasting the password). Either the pasted password is suffering from the same escaping issue, or more likely I think you're getting a false positive with your test connect doing the `select 1` because it's running as the postgres unix user which can get in without a password due to ident auth.