Some cleanups in CREATE/ALTER/DROP USER ref pages.
authorPeter Eisentraut
Wed, 27 Feb 2002 21:14:54 +0000 (21:14 +0000)
committerPeter Eisentraut
Wed, 27 Feb 2002 21:14:54 +0000 (21:14 +0000)
doc/src/sgml/ref/alter_user.sgml
doc/src/sgml/ref/create_user.sgml
doc/src/sgml/ref/drop_user.sgml

index 811905787651f71456c9ec1ea0a7ad5011220a70..0156565eb508dffd80d6814c799268c9fd39c108 100644 (file)
@@ -1,45 +1,49 @@
 
 
 
  
-  
-   ALTER USER
-  
+  ALTER USER
   SQL - Language Statements
  
+
  
-  
-   ALTER USER
-  
-  
-   change a database user account
-  
+  ALTER USER
+  change a database user account
  
+
  
-  
-   2001-07-10
-  
-  
+
 ALTER USER username [ [ WITH ] option [ ... ] ]
 
 where option can be:
 
-     [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' 
-        | CREATEDB | NOCREATEDB
-        | CREATEUSER | NOCREATEUSER 
-        | VALID UNTIL 'abstime'
-  
+      [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' 
+    | CREATEDB | NOCREATEDB
+    | CREATEUSER | NOCREATEUSER 
+    | VALID UNTIL 'abstime'
+
+
+  Description
 
-  
-   
-    1998-09-08
-   
-   </div> <div class="diff rem">-    Inputs</div> <div class="diff rem">-   
+  
+   ALTER USER is used to change the attributes of a
+   PostgreSQL user account.  Attributes not
+   mentioned in the command retain their previous settings.
+  
+
+  
+   Only a database superuser can change privileges and password
+   expiration with this command. Ordinary users can only change their
+   own password.
+  
+
+  
+   Parameters
 
    
     
@@ -47,7 +51,7 @@ where option can be:
       username
       
        
-   The name of the user whose details are to be altered.
+   The name of the user whose attributes are to be altered.
        
       
      
@@ -62,12 +66,12 @@ where option can be:
      
 
      
-      ENCRYPTED
-      UNENCRYPTED
+      ENCRYPTED
+      UNENCRYPTED
       
-        
-   These keywords control whether the
-   password is stored encrypted in pg_shadow.  (See
+       
+   These key words control whether the password is stored
+   encrypted in pg_shadow.  (See
    
    for more information about this choice.)
        
@@ -75,26 +79,27 @@ where option can be:
      
 
      
-      CREATEDB
-      NOCREATEDB
+      CREATEDB
+      NOCREATEDB
       
-        
-   These clauses define a user's ability to create databases.
-   If CREATEDB is specified, the user being defined will
-   be allowed to create his own databases. Using NOCREATEDB
-   will deny a user the ability to create databases.
+       
+   These clauses define a user's ability to create databases.  If
+   CREATEDB is specified, the user being
+   defined will be allowed to create his own databases. Using
+   NOCREATEDB will deny a user the ability to
+   create databases.
        
       
      
 
      
-      CREATEUSER
-      NOCREATEUSER
+      CREATEUSER
+      NOCREATEUSER
       
        
    These clauses determine whether a user will be permitted to
    create new users himself. This option will also make the user
-        a superuser who can override all access restrictions.
+   a superuser who can override all access restrictions.
        
       
      
@@ -111,122 +116,105 @@ where option can be:
     
    
   
-    
-  
-   
-    1998-09-08
-   
-   </div> <div class="diff rem">-    Outputs</div> <div class="diff rem">-   
-   
-    
-     
-      ALTER USER
-      
-       
-   Message returned if the alteration was successful.
-       
-      
-     
-     
-     
-      
-ERROR:  ALTER USER: user "username" does not exist
-       
-      
-       
-   Error message returned if the specified user is not known to
-   the database.
-       
-      
-     
-    
-   
-  
+
+  Diagnostics
 
-  
-   1998-09-08
-  
-  </div> <div class="diff rem">-   Description</div> <div class="diff rem">-  
   
-   ALTER USER is used to change the attributes of a user's
-   PostgreSQL account.  Attributes not mentioned
-   in the command retain their previous settings.
+   
+    
+     ALTER USER
+     
+      
+       Message returned if the alteration was successful.
+      
+     
+    
+     
+    
+     ERROR:  ALTER USER: user "username" does not exist
+     
+      
+       Error message returned if the specified user is not known to
+       the database.
+      
+     
+    
+   
   
+
+  Notes
+
   
-   Only a database superuser
-   can change privileges and password expiration with this command. Ordinary
-   users can only change their own password.
+   Use 
+   to add new users, and 
+   endterm="SQL-DROPUSER-title"> to remoe a user.
   
+
   
    ALTER USER cannot change a user's group memberships.
    Use 
    to do that.
   
-  
-   Use 
-   to create a new user and 
-   endterm="SQL-DROPUSER-title"> to remove a user.
-  
  
 
-  </div> <div class="diff rem">-   Usage</div> <div class="diff rem">-  
+  Examples
+
   
    Change a user password:
 
 
 ALTER USER davide WITH PASSWORD 'hu8jmn3';
 
+  
 
+  
    Change a user's valid until date:
 
 
 ALTER USER manuel VALID UNTIL 'Jan 31 2030';
 
+  
 
+  
    Change a user's valid until date, specifying that his
    authorization should expire at midday on 4th May 1998 using
    the time zone which is one hour ahead of UTC:
 
 ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
 
+  
 
+  
    Give a user the ability to create other users and new databases:
 
 
 ALTER USER miriam CREATEUSER CREATEDB;
 
-
   
  
 
-  </div> <div class="diff rem">-   Compatibility</div> <div class="diff rem">-  
+  Compatibility
     
-  <refsect2 id="R2-SQL-ALTERUSER-4">
-   
-    1998-09-08
-   
-   >
-    SQL92
-   
  >
-    There is no ALTER USER statement in
-    SQL92.
-    The standard leaves
-    the definition of users to the implementation.
-   </para>
-  refsect2>
+  <para>
+   The ALTER USER statement is a
+   PostgreSQL extension.  The SQL standard
+   leaves the definition of users to the implementation.
+  >
+
>
+  See Also
+
+  
+   
+   <member>>
+  simplelist>
  
 
 
index cc23cce03b86017a7523d28d80ff1d98b5db4aee..04a596ef745bbe54b905b799e8f7b48d9590b6af 100644 (file)
@@ -1,47 +1,48 @@
 
 
 
  
-  
-   CREATE USER
-  
+  CREATE USER
   SQL - Language Statements
  
+
  
-  
-   CREATE USER
-  
-  
-   define a new database user account
-  
+  CREATE USER
+  define a new database user account
  
+
  
-  
-   2001-07-10
-  
-  
+
 CREATE USER username [ [ WITH ] option [ ... ] ]
 
 where option can be:
     
-     SYSID uid 
-        | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
-        | CREATEDB | NOCREATEDB
-        | CREATEUSER | NOCREATEUSER
-        | IN GROUP groupname [, ...]
-        | VALID UNTIL 'abstime' 
-  
-  
-  
-   
-    1998-09-21
-   
-   </div> <div class="diff rem">-    Inputs</div> <div class="diff rem">-   
+      SYSID uid 
+    | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
+    | CREATEDB | NOCREATEDB
+    | CREATEUSER | NOCREATEUSER
+    | IN GROUP groupname [, ...]
+    | VALID UNTIL 'abstime' 
+
+
+  Description
+
+  
+   CREATE USER will add a new user to an instance
+   of PostgreSQL. Refer to the
+   Administrator's Guide for information about
+   managing users and authentication.  You must be a database
+   superuser to use this command.
+  
+
+  
+   Parameters
+
    
 
     
@@ -58,14 +59,14 @@ where option can be:
       uid
       
        
-        The SYSID clause can be used to choose
-        the PostgreSQL user id of the user
-        that is being created. It is not at all necessary that those
-        match the UNIX user ids, but some people
-        choose to keep the numbers the same.
+        The SYSID clause can be used to choose the
+        PostgreSQL user ID of the user that
+        is being created. It is not at all necessary that those match
+        the Unix user IDs, but some people choose to keep the numbers
+        the same.
        
        
-        If this is not specified, the highest assigned user id plus one
+        If this is not specified, the highest assigned user ID plus one
    (with a minimum of 100) will be used as default.
        
       
@@ -85,54 +86,57 @@ where option can be:
      
 
      
-      ENCRYPTED
-      UNENCRYPTED
+      ENCRYPTED
+      UNENCRYPTED
       
-        
-   These keywords control whether the
-   password is stored encrypted in pg_shadow.  (If neither
-   is specified, the default behavior is determined by the
-   PASSWORD_ENCRYPTION server parameter.)
-   If the presented string is already in MD5-encrypted format,
-   then it is stored as-is, regardless of whether
-   ENCRYPTED or UNENCRYPTED
-   is specified.  This allows reloading of encrypted passwords
-   during dump/restore.
-   
-   
+       
+   These keywords control whether the password is stored
+   encrypted in pg_shadow.  (If neither is specified,
+   the default behavior is determined by the
+   PASSWORD_ENCRYPTION server parameter.)  If
+   the presented string is already in MD5-encrypted format, then
+   it is stored as-is, regardless of whether
+   ENCRYPTED or UNENCRYPTED is specified.
+   This allows reloading of encrypted passwords during
+   dump/restore.
+       
+
+       
         See the chapter on client authentication in the
-   Administrator's Guide for details on
-        how to set up authentication mechanisms.  Note that older clients
-   may lack support for the MD5 authentication mechanism that's needed
-   to work with passwords that are stored encrypted.
+        Administrator's Guide for details on
+        how to set up authentication mechanisms.  Note that older
+        clients may lack support for the MD5 authentication mechanism
+        that is needed to work with passwords that are stored
+        encrypted.
        
       
      
 
      
-      CREATEDB
-      NOCREATEDB
+      CREATEDB
+      NOCREATEDB
       
-        
-   These clauses define a user's ability to create databases.
-   If CREATEDB is specified, the user being defined will
-   be allowed to create his own databases. Using NOCREATEDB
-   will deny a user the ability to create databases. If this
-   clause is omitted,  NOCREATEDB is used by default.
+       
+   These clauses define a user's ability to create databases.  If
+   CREATEDB is specified, the user being
+   defined will be allowed to create his own databases. Using
+   NOCREATEDB will deny a user the ability to
+   create databases. If this clause is omitted,
+   NOCREATEDB is used by default.
        
       
      
 
      
-      CREATEUSER
-      NOCREATEUSER
+      CREATEUSER
+      NOCREATEUSER
       
        
    These clauses determine whether a user will be permitted to
    create new users himself. This option will also make the user
-        a superuser who can override all access restrictions.
+   a superuser who can override all access restrictions.
    Omitting this clause will set the user's value of this
-   attribute to be NOCREATEUSER.
+   attribute to be NOCREATEUSER.
        
       
      
@@ -151,73 +155,58 @@ where option can be:
       abstime
       
        
-   The VALID UNTIL clause sets an absolute time after which the
-   user's password is no longer valid. 
-   If this clause is omitted the login will be valid for all time.
+   The VALID UNTIL clause sets an absolute
+   time after which the user's password is no longer valid.  If
+   this clause is omitted the login will be valid for all time.
        
       
      
     
    
   
-  
-  
-   
-    1998-09-21
-   
-   </div> <div class="diff rem">-    Outputs</div> <div class="diff rem">-   
 
-   
-    
-     
-      CREATE USER
-      
-       
-   Message returned if the command completes successfully.
-       
-      
-     
-    
-   
-  
+  
+
+  Diagnostics
 
-  
-   1998-09-21
-  
-  </div> <div class="diff rem">-   Description</div> <div class="diff rem">-  
   
-   CREATE USER will add a new user to an instance of 
-   PostgreSQL. Refer to the administrator's
-   guide for information about managing users and authentication.
-   You must be a database superuser to use this command.
+   
+    
+     CREATE USER
+     
+      
+       Message returned if the command completes successfully.
+      
+     
+    
+   
   
+
+  Notes
+
   
-   Use 
-   to change a user's password and privileges, and 
-   endterm="SQL-DROPUSER-title"> to remove a user.
-   Use 
-   to add or remove the user from other groups.
-   PostgreSQL
-   comes with a script 
-   endterm="APP-CREATEUSER-title">
-   which has the same functionality as this command (in fact, it calls this command)
-   but can be run from the command shell.
-    
-  
-  </div> <div class="diff rem">-   Usage</div> <div class="diff rem">-  
+   Use  to
+   change the attributes of a user, and 
+   endterm="SQL-DROPUSER-title"> to remove a user.  Use 
+   linkend="SQL-ALTERGROUP" endterm="SQL-ALTERGROUP-title"> to add the
+   user to groups or remove the user from groups.
+   PostgreSQL includes a program 
+   linkend="APP-CREATEUSER" endterm="APP-CREATEUSER-title"> that has
+   the same functionality as this command (in fact, it calls this
+   command) but can be run from the command shell.
+  
+
+  Examples
+
   
    Create a user with no password:
 
-CREATE USER jonathan
+CREATE USER jonathan;
 
   
 
@@ -246,23 +235,24 @@ CREATE USER manuel WITH PASSWORD 'jw8s0F4' CREATEDB;
   
  
  
-  </div> <div class="diff rem">-   Compatibility</div> <div class="diff rem">-  
+  Compatibility
   
-  
-   
-    1998-09-21
-   
-   </div> <div class="diff rem">-    SQL92</div> <div class="diff rem">-   
+  
+   The CREATE USER statement is a
+   PostgreSQL extension.  The SQL standard
+   leaves the definition of users to the implementation.
+  
 
-   
-    There is no CREATE USER statement in SQL92.
-   
-  
+  See Also
+
+  
+   
+   
+   
+  
  
 
 
index d0a9087c06ea28824d50b1239d1398b02fb34a5b..d7f3af80b827d23375727dfd3accc618ce5ecba4 100644 (file)
@@ -1,40 +1,37 @@
 
 
 
  
-  
-   DROP USER
-  
+  DROP USER
   SQL - Language Statements
  
  
-  
-   DROP USER
-  
-  
-   remove a database user account
-  
+  DROP USER
+  remove a database user account
  
+
  
-  
-   1999-07-20
-  
-  
+
 DROP USER name
-  
-  
-  
-   
-    1998-09-22
-   
-   </div> <div class="diff rem">-    Inputs</div> <div class="diff rem">-   
-   
+
 
+  Description
+
+  
+   DROP USER removes the specified user from the database.
+   It does not remove tables, views, or other objects owned by the user. If the
+   user owns any database, an error is raised.
+  
+
+  
+   Parameters
+
+   
     
      
       name
@@ -47,80 +44,62 @@ DROP USER name
     
    
   
-  
-  
-   
-    1998-09-22
-   
-   </div> <div class="diff rem">-    Outputs</div> <div class="diff rem">-   
-   
-    
-     
-      DROP USER
-      
-       
-   The message returned if the user is successfully deleted.
-       
-      
-     
-
-     
-      
-ERROR:  DROP USER: user "name" does not exist
-       
-      
-       
-   This message occurs if the user name is not found.
-       
-      
-     
 
-     
-      
-DROP USER: user "name" owns database "name", cannot be removed
-       
-      
-       
-        You must drop the database first or change its ownership.
-       
-      
-     
 
-    
-   
-  
+  Diagnostics
 
-  
-   1998-09-22
-  
-  </div> <div class="diff rem">-   Description</div> <div class="diff rem">-  
   
-   DROP USER removes the specified user from the database.
-   It does not remove tables, views, or other objects owned by the user. If the
-   user owns any database you get an error.
+   
+    
+     DROP USER
+     
+      
+       The message returned if the user is successfully deleted.
+      
+     
+    
+
+    
+     ERROR:  DROP USER: user "name" does not exist
+     
+      
+       This message occurs if the user name is not found.
+      
+     
+    
+
+    
+     DROP USER: user "name" owns database "name", cannot be removed
+     
+      
+       You must drop the database first or change its ownership.
+      
+     
+    
+
+   
   
+
+  Notes
+
   
    Use 
    to add new users, and 
-   endterm="SQL-ALTERUSER-title"> to change a user's properties.
-   PostgreSQL
-   comes with a script 
-   endterm="APP-DROPUSER-title">
-   which has the same functionality as this command (in fact, it calls this command)
+   endterm="SQL-ALTERUSER-title"> to change a user's attributes.
+   PostgreSQL includes a program 
+   linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
+   same functionality as this command (in fact, it calls this command)
    but can be run from the command shell.
-    
+  
  
 
-  </div> <div class="diff rem">-   Usage</div> <div class="diff rem">-  
+  Examples
+
   
    To drop a user account:
 
@@ -129,23 +108,26 @@ DROP USER jonathan;
   
  
  
-  </div> <div class="diff rem">-   Compatibility</div> <div class="diff rem">-  
+  Compatibility
   
-  
-   
-    1998-09-22
-   
-   </div> <div class="diff rem">-    SQL92</div> <div class="diff rem">-   
-   
-    There is no DROP USER in SQL92.
-   
-  
+  
+   The DROP USER statement is a
+   PostgreSQL extension.  The SQL standard
+   leaves the definition of users to the implementation.
+  
  
+
+  See Also
+
+  
+   
+   
+   
+  
+