shell脚本操作postgresql改密码

https://cloud.tencent.com/developer/ask/59833

sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'password';"

sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '123456';"
原文地址:https://www.cnblogs.com/Billy-rao/p/14628701.html