Creating Users

Database users are separate entities from regular operating system users. Depending on the particular application, it might be possible to have only one or two total database users. However, if multiple users need to connect to the database—each with his or her own set of access rights—it is desirable to create individual user accounts.

The easiest way to create users is to utilize the command-line utility createuser.

There are three main attributes to consider when creating new users:

  • Should they be able to create their own users? (Are they superusers?)

  • Should they be able to create their own databases?

  • Is authentication required? If so, what type and what password?

The actual act of creating users can take place either at the ...

Get PostgreSQL Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.