4 The catalog pg_authid contains information about database authorization
5 identifiers (roles). A role subsumes the concepts of “users” and
6 “groups”. A user is essentially just a role with the rolcanlogin flag
7 set. Any role (with or without rolcanlogin) can have other roles as
8 members; see pg_auth_members.
10 Since this catalog contains passwords, it must not be publicly
11 readable. pg_roles is a publicly readable view on pg_authid that blanks
12 out the password field.
14 Chapter 21 contains detailed information about user and privilege
17 Because user identities are cluster-wide, pg_authid is shared across
18 all databases of a cluster: there is only one copy of pg_authid per
19 cluster, not one per database.
21 Table 52.8. pg_authid Columns
37 Role has superuser privileges
41 Role automatically inherits privileges of roles it is a member of
45 Role can create more roles
49 Role can create databases
53 Role can log in. That is, this role can be given as the initial session
54 authorization identifier.
58 Role is a replication role. A replication role can initiate replication
59 connections and create and drop replication slots.
63 Role bypasses every row-level security policy, see Section 5.9 for more
68 For roles that can log in, this sets maximum number of concurrent
69 connections this role can make. -1 means no limit.
73 Encrypted password; null if none. The format depends on the form of
76 rolvaliduntil timestamptz
78 Password expiry time (only used for password authentication); null if
81 For an MD5 encrypted password, rolpassword column will begin with the
82 string md5 followed by a 32-character hexadecimal MD5 hash. The MD5
83 hash will be of the user's password concatenated to their user name.
84 For example, if user joe has password xyzzy, PostgreSQL will store the
89 Support for MD5-encrypted passwords is deprecated and will be removed
90 in a future release of PostgreSQL. Refer to Section 20.5 for details
91 about migrating to another password type.
93 If the password is encrypted with SCRAM-SHA-256, it has the format:
94 SCRAM-SHA-256$<iteration count>:<salt>$<StoredKey>:<ServerKey>
96 where salt, StoredKey and ServerKey are in Base64 encoded format. This
97 format is the same as that specified by RFC 5803.