From: Bruce Momjian Date: Thu, 20 Mar 2003 20:05:32 +0000 (+0000) Subject: This is not the only place in the system catalogs where NULL is X-Git-Tag: REL7_4_BETA1~873 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2e09fcd5ea47250136f8dcb8ff42092a9e8be07;p=postgresql This is not the only place in the system catalogs where NULL is effectively used to mean a default value that could also be spelled out explicitly. (ACLs behave that way, and useconfig/datconfig do too IIRC.) It's a bit of a hack, but it saves table space and backend code --- without this convention the default would have to be inserted "manually" since we have no mechanism to supply defaults when C code is forming a new catalog tuple. I'm inclined to leave the code alone. But Alvaro is right that it'd be good to point out the 'infinity' option in the CREATE USER and ALTER USER man pages. (Doc patch please?) Alvaro Herrera --- diff --git a/doc/src/sgml/ref/alter_user.sgml b/doc/src/sgml/ref/alter_user.sgml index e6c5ac54d7..a37424cd26 100644 --- a/doc/src/sgml/ref/alter_user.sgml +++ b/doc/src/sgml/ref/alter_user.sgml @@ -1,5 +1,5 @@ @@ -124,7 +124,8 @@ ALTER USER username RESET The date (and, optionally, the time) - at which this user's password is to expire. + at which this user's password is to expire. To set the password + never to expire, use 'infinity'. @@ -232,6 +233,13 @@ ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1'; + + Make a user valid forever: + +ALTER USER fred VALID UNTIL 'infinity'; + + + Give a user the ability to create other users and new databases: