Clarify documentation about PASSWORD in CREATE/ALTER ROLE
authorMichael Paquier
Fri, 23 Nov 2018 00:11:12 +0000 (09:11 +0900)
committerMichael Paquier
Fri, 23 Nov 2018 00:11:12 +0000 (09:11 +0900)
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

doc/src/sgml/ref/alter_role.sgml
doc/src/sgml/ref/alter_user.sgml
doc/src/sgml/ref/create_role.sgml
doc/src/sgml/ref/create_user.sgml

index 573a3e80f752e102095ec63310817d0685c1de93..dbf258ef50d03fd769d7b8e318685e1b51f1f198 100644 (file)
@@ -33,7 +33,7 @@ ALTER ROLE role_specification [ WIT
     | REPLICATION | NOREPLICATION
     | BYPASSRLS | NOBYPASSRLS
     | CONNECTION LIMIT connlimit
-    | [ ENCRYPTED ] PASSWORD 'password'
+    | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
     | VALID UNTIL 'timestamp'
 
 ALTER ROLE name RENAME TO new_name
@@ -168,7 +168,8 @@ ALTER ROLE { role_specification | A
       BYPASSRLS
       NOBYPASSRLS
       CONNECTION LIMIT connlimit
-      ENCRYPTED ] PASSWORD password
+      ENCRYPTED ] PASSWORD 'password'
+      PASSWORD NULL
       VALID UNTIL 'timestamp'
       
        
index 8f50f43089a909756e6accb10629440d7bc97f4d..6769c8ecc4b7db2754829ea0cd86706245db70d6 100644 (file)
@@ -33,7 +33,7 @@ ALTER USER role_specification [ WIT
     | REPLICATION | NOREPLICATION
     | BYPASSRLS | NOBYPASSRLS
     | CONNECTION LIMIT connlimit
-    | [ ENCRYPTED ] PASSWORD 'password'
+    | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
     | VALID UNTIL 'timestamp'
 
 ALTER USER name RENAME TO new_name
index 9c3b6978af411eb17b22552507ab8f26e9bba1ff..db842732a8d798b6c1f975283601c5bbe63a1ce2 100644 (file)
@@ -33,7 +33,7 @@ CREATE ROLE name [ [ WITH ] 
     | REPLICATION | NOREPLICATION
     | BYPASSRLS | NOBYPASSRLS
     | CONNECTION LIMIT connlimit
-    | [ ENCRYPTED ] PASSWORD 'password'
+    | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
     | VALID UNTIL 'timestamp'
     | IN ROLE role_name [, ...]
     | IN GROUP role_name [, ...]
@@ -210,7 +210,8 @@ CREATE ROLE name [ [ WITH ] 
      
 
      
-      ENCRYPTED ] PASSWORD password
+      ENCRYPTED ] PASSWORD 'password'
+      PASSWORD NULL
       
        
         Sets the role's password.  (A password is only of use for
index a51dc50c978f4d071ebd0cd6ab6300a7b6a6565c..198e06e7230e82ec61f7bcfa70c5c5736dcbbf6d 100644 (file)
@@ -33,7 +33,7 @@ CREATE USER name [ [ WITH ] 
     | REPLICATION | NOREPLICATION
     | BYPASSRLS | NOBYPASSRLS
     | CONNECTION LIMIT connlimit
-    | [ ENCRYPTED ] PASSWORD 'password'
+    | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
     | VALID UNTIL 'timestamp'
     | IN ROLE role_name [, ...]
     | IN GROUP role_name [, ...]