Skip to content

Commit d392e9b

Browse files
committed
Clarify documentation about PASSWORD in CREATE/ALTER ROLE
The documentation of CREATE/ALTER ROLE has been missing two things related to PASSWORD: - The password value provided needs to be quoted, some places of the documentation marked the field with quotes, but not others, which led to confusion. - PASSWORD NULL was not provided consistently, with ENCRYPTED being not compatible with it. Reported-by: Steven Winfield Author: Michael Paquier Reviewed-by: David G. Johnston Discussion: https://postgr.es/m/154282901979.1316.7418475422120496802@wrigleys.postgresql.org
1 parent eba2ce1 commit d392e9b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

doc/src/sgml/ref/alter_role.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ALTER ROLE <replaceable class="parameter">role_specification</replaceable> [ WIT
3333
| REPLICATION | NOREPLICATION
3434
| BYPASSRLS | NOBYPASSRLS
3535
| CONNECTION LIMIT <replaceable class="parameter">connlimit</replaceable>
36-
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>'
36+
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>' | PASSWORD NULL
3737
| VALID UNTIL '<replaceable class="parameter">timestamp</replaceable>'
3838

3939
ALTER ROLE <replaceable class="parameter">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
@@ -168,7 +168,8 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
168168
<term><literal>BYPASSRLS</literal></term>
169169
<term><literal>NOBYPASSRLS</literal></term>
170170
<term><literal>CONNECTION LIMIT</literal> <replaceable class="parameter">connlimit</replaceable></term>
171-
<term>[ <literal>ENCRYPTED</literal> ] <literal>PASSWORD</literal> <replaceable class="parameter">password</replaceable></term>
171+
<term>[ <literal>ENCRYPTED</literal> ] <literal>PASSWORD</literal> '<replaceable class="parameter">password</replaceable>'</term>
172+
<term><literal>PASSWORD NULL</literal></term>
172173
<term><literal>VALID UNTIL</literal> '<replaceable class="parameter">timestamp</replaceable>'</term>
173174
<listitem>
174175
<para>

doc/src/sgml/ref/alter_user.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ALTER USER <replaceable class="parameter">role_specification</replaceable> [ WIT
3333
| REPLICATION | NOREPLICATION
3434
| BYPASSRLS | NOBYPASSRLS
3535
| CONNECTION LIMIT <replaceable class="parameter">connlimit</replaceable>
36-
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>'
36+
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>' | PASSWORD NULL
3737
| VALID UNTIL '<replaceable class="parameter">timestamp</replaceable>'
3838

3939
ALTER USER <replaceable class="parameter">name</replaceable> RENAME TO <replaceable>new_name</replaceable>

doc/src/sgml/ref/create_role.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac
3333
| REPLICATION | NOREPLICATION
3434
| BYPASSRLS | NOBYPASSRLS
3535
| CONNECTION LIMIT <replaceable class="parameter">connlimit</replaceable>
36-
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>'
36+
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>' | PASSWORD NULL
3737
| VALID UNTIL '<replaceable class="parameter">timestamp</replaceable>'
3838
| IN ROLE <replaceable class="parameter">role_name</replaceable> [, ...]
3939
| IN GROUP <replaceable class="parameter">role_name</replaceable> [, ...]
@@ -210,7 +210,8 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac
210210
</varlistentry>
211211

212212
<varlistentry>
213-
<term>[ <literal>ENCRYPTED</literal> ] <literal>PASSWORD</literal> <replaceable class="parameter">password</replaceable></term>
213+
<term>[ <literal>ENCRYPTED</literal> ] <literal>PASSWORD</literal> '<replaceable class="parameter">password</replaceable>'</term>
214+
<term><literal>PASSWORD NULL</literal></term>
214215
<listitem>
215216
<para>
216217
Sets the role's password. (A password is only of use for

doc/src/sgml/ref/create_user.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CREATE USER <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac
3333
| REPLICATION | NOREPLICATION
3434
| BYPASSRLS | NOBYPASSRLS
3535
| CONNECTION LIMIT <replaceable class="parameter">connlimit</replaceable>
36-
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>'
36+
| [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>' | PASSWORD NULL
3737
| VALID UNTIL '<replaceable class="parameter">timestamp</replaceable>'
3838
| IN ROLE <replaceable class="parameter">role_name</replaceable> [, ...]
3939
| IN GROUP <replaceable class="parameter">role_name</replaceable> [, ...]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy