Skip to navigation

Warning message

log in to add comments or rate this document

How to create a new user in PostgreSQL database?

Updated 2012-01-20T13:06:07+00:00

Issue

How do I create a new user in PostgreSQL and define specific roles for it?

Environment

  • Red Hat Enterprise Linux 5.7

Resolution

To create a new user in PostgreSQL you can use the command createuser as described in PostgreSQL 8.4.10 Documentation and to set specific roles you can check the CREATE ROLE command.