Skip to main content
3 of 3
added 8 characters in body
LayneSadler
  • 6.1k
  • 6
  • 55
  • 91

To interactively change/assign the password of an existing user in the psql shell

\password <username>
# you will be prompted for the password that you want to define

If you leave the username blank, it will prompt you to change the password of the 'postgres' user by default.

LayneSadler
  • 6.1k
  • 6
  • 55
  • 91