I am trying to reset password for all users with following psql command. The command executes successfully but the value of password is wrong. The password is bcrypt string of 12345
psql -U myuser -d mydb -c "update \"Users\" set \"PASSWORD\" = '$2a$10$u0vd9noCisUUJME9k4daU.1/TNBPaeQam8dnV6tUOWwjn4kFT5XdW'"
The query:
select "PASSWORD" from "Users";
returns:
a.1/TNBPaeQam8dnV6tUOWwjn4kFT5XdW
instead of:
$2a$10$u0vd9noCisUUJME9k4daU.1/TNBPaeQam8dnV6tUOWwjn4kFT5XdW
What I understand that postgres is taking $ as a placeholder or special character. How can I escape it?