Reputation: 1994
I altered password for a user. I thought there would be a flush privileges command like in MySQL but there was not. So I restarted the server sudo /etc/init.d/postgres restart
, however old password still active.
What do I have to do to make my alter user password command to stick?
On version 9.3.10
Upvotes: 0
Views: 2102
Reputation: 95761
alter user mmuser set password to "test"
This SQL statement should have raised an error.
ERROR: unrecognized configuration parameter "password" SQL state: 42704
Also, in SQL, strings take single quotes.
Current docs for the syntax, excerpted below.
ALTER USER name [ [ WITH ] option [ ... ] ] where option can be: [snip] PASSWORD 'password'
So you needed
alter user mmuser password 'test';
Upvotes: 2