create user psql commands code example Example: How do I add a user to a postgres database? cli psql=# grant all privileges on database <dbname> to <username>