From: Tom Lane Date: Tue, 4 Jan 2005 00:39:53 +0000 (+0000) Subject: More minor updates and copy-editing. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=90381c72ac591dce18e937e2a00dee4d6e93c738;p=users%2Fbernd%2Fpostgres.git More minor updates and copy-editing. --- diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml index 458ed4c221..5454adc96f 100644 --- a/doc/src/sgml/ref/alter_database.sgml +++ b/doc/src/sgml/ref/alter_database.sgml @@ -25,7 +25,7 @@ ALTER DATABASE name RESET name RENAME TO newname -ALTER DATABASE name OWNER TO new_owner +ALTER DATABASE name OWNER TO newowner @@ -33,12 +33,12 @@ ALTER DATABASE name OWNER TO Description - ALTER DATABASE is used to change the attributes + ALTER DATABASE changes the attributes of a database. - The first two forms change the session default of a run-time + The first two forms change the session default for a run-time configuration variable for a PostgreSQL database. Whenever a new session is subsequently started in that database, the specified value becomes the session default value. @@ -46,12 +46,14 @@ ALTER DATABASE name OWNER TO postgresql.conf or has been received from the postmaster command line. Only the database owner or a superuser can change the session defaults for a - database. + database. Certain variables cannot be set this way, or can only be + set by a superuser. The third form changes the name of the database. Only the database - owner can rename a database, and only if he has the + owner or a superuser can rename a database; non-superuser owners must + also have the CREATEDB privilege. The current database cannot be renamed. (Connect to a different database if you need to do that.) @@ -71,7 +73,7 @@ ALTER DATABASE name OWNER TO name - The name of the database whose session defaults are to be altered. + The name of the database whose attributes are to be altered. @@ -81,14 +83,13 @@ ALTER DATABASE name OWNER TO value - Set the session default for this database of the specified - configuration parameter to the given value. If + Set this database's session default for the specified configuration + parameter to the given value. If value is DEFAULT or, equivalently, RESET is used, the - database-specific variable setting is removed and the system-wide - default + database-specific setting is removed, so the system-wide default setting will be inherited in new sessions. Use RESET - ALL to clear all settings. + ALL to clear all database-specific settings. @@ -107,6 +108,15 @@ ALTER DATABASE name OWNER TO + + + newowner + + + The new owner of the database. + + + @@ -114,9 +124,10 @@ ALTER DATABASE name OWNER TO Notes - Using , - it is also possible to tie a session default to a specific user - rather than a database. User-specific settings override database-specific + It is also possible to tie a session default to a specific user + rather than to a database; see + . + User-specific settings override database-specific ones if there is a conflict. @@ -147,7 +158,6 @@ ALTER DATABASE test SET enable_indexscan TO off; See Also - diff --git a/doc/src/sgml/ref/alter_group.sgml b/doc/src/sgml/ref/alter_group.sgml index 5199d7d116..698276fcd5 100644 --- a/doc/src/sgml/ref/alter_group.sgml +++ b/doc/src/sgml/ref/alter_group.sgml @@ -31,11 +31,12 @@ ALTER GROUP groupname RENAME TO Description - ALTER GROUP is used to change a user group. The - first two variants add or remove users from a group. Only database - superusers can use this command. Adding a user to a group does not - create the user. Similarly, removing a user from a group does not - drop the user itself. + ALTER GROUP changes the attributes of a user group. + + + + The first two variants add users to a group or remove them from a group. + Only database superusers can use this command. @@ -61,8 +62,9 @@ ALTER GROUP groupname RENAME TO username - Users which are to be added or removed from the group. The users - must exist. + Users that are to be added to or removed from the group. The users + must already exist; ALTER GROUP does not create or + drop users. diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 98aeeeb377..f950edf783 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -129,7 +129,8 @@ where action is one of: operations. The target can be set in the range 0 to 1000; alternatively, set it to -1 to revert to using the system default statistics - target. For more information on the use of statistics by the + target (). + For more information on the use of statistics by the PostgreSQL query planner, refer to . @@ -153,9 +154,9 @@ where action is one of: compressible data. EXTERNAL is for external, uncompressed data, and EXTENDED is for external, compressed data. EXTENDED is the default for all - data types that support it. The use of EXTERNAL will, for example, - make substring operations on a text column faster, at the penalty of - increased storage space. + data types that support it. Use of EXTERNAL will + make substring operations on text and bytea + columns faster, at the penalty of increased storage space. @@ -285,15 +286,15 @@ where action is one of: name - The name (possibly schema-qualified) of an existing table to - alter. If ONLY is specified, only that table is - altered. If ONLY is not specified, the table and all - its descendant tables (if any) are updated. * can be - appended to the table name to indicate that descendant tables are - to be altered, but in the current version, this is the default - behavior. (In releases before 7.1, ONLY was the - default behavior. The default can be altered by changing the - configuration parameter .) + The name (possibly schema-qualified) of an existing table to + alter. If ONLY is specified, only that table is + altered. If ONLY is not specified, the table and all + its descendant tables (if any) are updated. * can be + appended to the table name to indicate that descendant tables are + to be altered, but in the current version, this is the default + behavior. (In releases before 7.1, ONLY was the + default behavior. The default can be altered by changing the + configuration parameter .) @@ -302,7 +303,7 @@ where action is one of: column - Name of a new or existing column. + Name of a new or existing column. @@ -311,7 +312,7 @@ where action is one of: new_column - New name for an existing column. + New name for an existing column. @@ -320,7 +321,7 @@ where action is one of: new_name - New name for the table. + New name for the table. @@ -329,8 +330,8 @@ where action is one of: type - Data type of the new column, or new data type for an existing - column. + Data type of the new column, or new data type for an existing + column. @@ -339,7 +340,7 @@ where action is one of: table_constraint - New table constraint for the table. + New table constraint for the table. @@ -348,7 +349,7 @@ where action is one of: constraint_name - Name of an existing constraint to drop. + Name of an existing constraint to drop. @@ -358,7 +359,7 @@ where action is one of: Automatically drop objects that depend on the dropped column - or constraint (for example, views referencing the column). + or constraint (for example, views referencing the column). @@ -368,7 +369,7 @@ where action is one of: Refuse to drop the column or constraint if there are any dependent - objects. This is the default behavior. + objects. This is the default behavior. @@ -377,7 +378,7 @@ where action is one of: index_name - The index name on which the table should be marked for clustering. + The index name on which the table should be marked for clustering. @@ -386,7 +387,7 @@ where action is one of: new_owner - The user name of the new owner of the table. + The user name of the new owner of the table. @@ -395,7 +396,7 @@ where action is one of: tablespace_name - The tablespace name to which the table will be moved. + The tablespace name to which the table will be moved. @@ -472,7 +473,8 @@ ALTER TABLE table ALTER COLUMN anycol TYPE anytype; though a USING clause is supplied. In such cases, drop the default with DROP DEFAULT, perform the ALTER TYPE, and then use SET DEFAULT to add a suitable new - default. + default. Similar considerations apply to indexes and constraints involving + the column. @@ -593,7 +595,7 @@ ALTER TABLE distributors ADD PRIMARY KEY (dist_id); - To move a table to a different tablespace: + To move a table to a different tablespace: ALTER TABLE distributors SET TABLESPACE fasttablespace; diff --git a/doc/src/sgml/ref/alter_user.sgml b/doc/src/sgml/ref/alter_user.sgml index 703354c394..6a8e9b52b3 100644 --- a/doc/src/sgml/ref/alter_user.sgml +++ b/doc/src/sgml/ref/alter_user.sgml @@ -24,9 +24,9 @@ ALTER USER name [ [ WITH ] option can be: - [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' - | CREATEDB | NOCREATEDB + CREATEDB | NOCREATEDB | CREATEUSER | NOCREATEUSER + | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' | VALID UNTIL 'abstime' ALTER USER name RENAME TO newname @@ -40,22 +40,21 @@ ALTER USER name RESET Description - ALTER USER is used to change the attributes of a + ALTER USER changes the attributes of a PostgreSQL user account. Attributes not mentioned in the command retain their previous settings. - The first variant of this command in the synopsis changes certain - global user privileges and authentication settings. (See below for - details.) Only a database superuser can change these privileges and - the password expiration with this command. Ordinary users can only - change their own password. + The first variant of this command listed in the synopsis changes certain + per-user privileges and authentication settings. (See below for + details.) Database superusers can change any of these settings for any + user. Ordinary users can only change their own password. The second variant changes the name of the user. Only a database - superuser can rename user accounts. The session user cannot be + superuser can rename user accounts. The current session user cannot be renamed. (Connect as a different user if you need to do that.) Because MD5-encrypted passwords use the user name as cryptographic salt, renaming a user clears their MD5 @@ -70,6 +69,8 @@ ALTER USER name RESET or has been received from the postmaster command line. Ordinary users can change their own session defaults. Superusers can change anyone's session defaults. + Certain variables cannot be set this way, or can only be + set by a superuser. @@ -81,55 +82,56 @@ ALTER USER name RESET name - The name of the user whose attributes are to be altered. + The name of the user whose attributes are to be altered. - password + CREATEDB + NOCREATEDB - The new password to be used for this account. + These clauses define a user's ability to create databases. If + CREATEDB is specified, the user + will be allowed to create his own databases. Using + NOCREATEDB will deny a user the ability to + create databases. (If the user is also a superuser, then this + setting has no real effect.) - ENCRYPTED - UNENCRYPTED + CREATEUSER + NOCREATEUSER - These key words control whether the password is stored - encrypted in pg_shadow. (See - - for more information about this choice.) + These clauses determine whether a user will be permitted to + create new users himself. CREATEUSER will also make + the user a superuser, who can override all access restrictions. - CREATEDB - NOCREATEDB + password - These clauses define a user's ability to create databases. If - CREATEDB is specified, the user - will be allowed to create his own databases. Using - NOCREATEDB will deny a user the ability to - create databases. + The new password to be used for this account. - CREATEUSER - NOCREATEUSER + ENCRYPTED + UNENCRYPTED - 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. + These key words control whether the password is stored + encrypted in pg_shadow. (See + + for more information about this choice.) @@ -138,9 +140,9 @@ ALTER USER name RESET abstime - The date (and, optionally, the time) - at which this user's password is to expire. To set the password - never to expire, use 'infinity'. + The date (and, optionally, the time) + at which this user's password is to expire. To set the password + never to expire, use 'infinity'. @@ -149,7 +151,7 @@ ALTER USER name RESET newname - The new name of the user. + The new name of the user. @@ -163,9 +165,9 @@ ALTER USER name RESET parameter to the given value. If value is DEFAULT or, equivalently, RESET is used, the - user-specific variable setting is removed and the user will + user-specific variable setting is removed, so the user will inherit the system-wide default setting in new sessions. Use - RESET ALL to clear all settings. + RESET ALL to clear all user-specific settings. @@ -194,9 +196,18 @@ ALTER USER name RESET - Using , it is also possible to tie a - session default to a specific database rather than a user. + The VALID UNTIL clause defines an expiration time for a + password only, not for the user account per se. In + particular, the expiration time is not enforced when logging in using + a non-password-based authentication method. + + + + It is also possible to tie a + session default to a specific database rather than to a user; see + . + User-specific settings override database-specific + ones if there is a conflict. @@ -204,7 +215,7 @@ ALTER USER name RESET Examples - Change a user password: + Change a user's password: ALTER USER davide WITH PASSWORD 'hu8jmn3'; @@ -212,7 +223,7 @@ ALTER USER davide WITH PASSWORD 'hu8jmn3'; - Change a user's valid until date: + Change the expiration date of the user's password: ALTER USER manuel VALID UNTIL 'Jan 31 2030'; @@ -220,8 +231,8 @@ 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 2005 using + Change a password expiration date, specifying that the password + should expire at midday on 4th May 2005 using the time zone which is one hour ahead of UTC: ALTER USER chris VALID UNTIL 'May 4 12:00:00 2005 +1'; @@ -229,7 +240,7 @@ ALTER USER chris VALID UNTIL 'May 4 12:00:00 2005 +1'; - Make a user valid forever: + Make a password valid forever: ALTER USER fred VALID UNTIL 'infinity'; diff --git a/doc/src/sgml/ref/checkpoint.sgml b/doc/src/sgml/ref/checkpoint.sgml index 6b696b7051..804ae93d32 100644 --- a/doc/src/sgml/ref/checkpoint.sgml +++ b/doc/src/sgml/ref/checkpoint.sgml @@ -37,7 +37,7 @@ CHECKPOINT A checkpoint is a point in the transaction log sequence at which all data files have been updated to reflect the information in the - log. All data files will be flushed to disk. Refer to the + log. All data files will be flushed to disk. Refer to for more information about the WAL system. diff --git a/doc/src/sgml/ref/close.sgml b/doc/src/sgml/ref/close.sgml index effd6231b1..e5f007f603 100644 --- a/doc/src/sgml/ref/close.sgml +++ b/doc/src/sgml/ref/close.sgml @@ -72,7 +72,8 @@ CLOSE name PostgreSQL does not have an explicit OPEN cursor statement; a cursor is considered - open when it is declared. Use the DECLARE + open when it is declared. Use the + statement to declare a cursor. @@ -95,6 +96,16 @@ CLOSE liahona; CLOSE is fully conforming with the SQL standard. + + + See Also + + + + + + +