Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6eefe2c

Browse files
committed
Doc: clarify introduction to database roles.
Word-smith section 22.1 ("Database Roles") a little bit in hopes of removing confusion about how the bootstrap superuser's name is chosen. While here, I couldn't help noticing that the claim that the bootstrap superuser is the only initially-existing role has been a lie since we started to invent predefined roles. We don't want too much detail in this very introductory text, but it seems worth changing it to say that it's the only initially-existing login-capable role. Per documentation comment from Maja Zaloznik. Discussion: https://postgr.es/m/167931662853.3349090.18217722739345182859@wrigleys.postgresql.org
1 parent 5548416 commit 6eefe2c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

doc/src/sgml/user-manag.sgml

+11-6
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,26 @@ dropuser <replaceable>name</replaceable>
8888

8989
<para>
9090
To determine the set of existing roles, examine the <structname>pg_roles</structname>
91-
system catalog, for example
91+
system catalog, for example:
9292
<synopsis>
9393
SELECT rolname FROM pg_roles;
94+
</synopsis>
95+
or to see just those capable of logging in:
96+
<synopsis>
97+
SELECT rolname FROM pg_roles WHERE rolcanlogin;
9498
</synopsis>
9599
The <xref linkend="app-psql"/> program's <literal>\du</literal> meta-command
96100
is also useful for listing the existing roles.
97101
</para>
98102

99103
<para>
100104
In order to bootstrap the database system, a freshly initialized
101-
system always contains one predefined role. This role is always
102-
a <quote>superuser</quote>, and by default (unless altered when running
103-
<command>initdb</command>) it will have the same name as the
104-
operating system user that initialized the database
105-
cluster. Customarily, this role will be named
105+
system always contains one predefined login-capable role. This role
106+
is always a <quote>superuser</quote>, and by default it will have
107+
the same name as the operating system user that initialized the
108+
database cluster, unless another name is specified while
109+
running <command>initdb</command>.
110+
It is common, but not required, to arrange for this role to be named
106111
<literal>postgres</literal>. In order to create more roles you
107112
first have to connect as this initial role.
108113
</para>

0 commit comments

Comments
 (0)