From 1ac838edba409abe87649c6820a9ee492cb1a1c5 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Mon, 14 Jun 1999 07:37:05 +0000 Subject: Minor updates for release. Split reference pages for CREATE TABLE AS and SELECT INTO to allow psgml (the emacs parser) to handle parsing. --- doc/src/sgml/ref/create_user.sgml | 432 ++++++++++++++++++++------------------ 1 file changed, 222 insertions(+), 210 deletions(-) (limited to 'doc/src/sgml/ref/create_user.sgml') diff --git a/doc/src/sgml/ref/create_user.sgml b/doc/src/sgml/ref/create_user.sgml index 3ab3e2958d..c089194999 100644 --- a/doc/src/sgml/ref/create_user.sgml +++ b/doc/src/sgml/ref/create_user.sgml @@ -1,187 +1,200 @@ - - - + + + CREATE USER - - SQL - Language Statements - - - + + SQL - Language Statements + + + CREATE USER - - + + Creates account information for a new user - + - - - 1998-09-21 - - -CREATE USER username - [ WITH PASSWORD password ] + + + 1998-09-21 + + +CREATE USER username + [ WITH PASSWORD password ] [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ] - [ IN GROUP groupname [, ...] ] - [ VALID UNTIL 'abstime' ] - + [ IN GROUP groupname [, ...] ] + [ VALID UNTIL 'abstime' ] + - - - 1998-09-21 - - + <refsect2 id="R2-SQL-CREATEUSER-1"> + <refsect2info> + <date>1998-09-21</date> + </refsect2info> + <title> Inputs - - - - - - username - - - - The name of the user. - - - - - - password - - - - The WITH PASSWORD clause sets the user's password within - the "pg_shadow" table. For this reason, - "pg_shadow" is no - longer accessible to the instance of Postgres that the - Postgres user's password is initially set to NULL. - The text here has got garbled. - When a - user's password in the "pg_shadow" - table is NULL, user - authentication proceeds as it historically has (HBA, - PG_PASSWORD, etc). However, if a password is set for a - user, a new authentication system supplants any other - configured for the Postgres instance, and the password - stored in the "pg_shadow" table is used - for authentication. - For more details on how this authentication system - functions see pg_crypt(3). If the WITH PASSWORD clause is - omitted, the user's password is set to the empty - string with equates to a NULL value in the authentication - system mentioned above. - - - - - - 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. - - - - - - CREATEUSER/NOCREATEUSER - - - - These clauses determine whether a user will be permitted to - create new - users in an instance of Postgres. - Omitting this clause will set the user's value of this - attribute to be NOCREATEUSER. - - - - - - groupname - - - - A name of a group into which to insert the user as a new member. - - - - - - abstime - - - - The VALID UNTIL clause sets an absolute time after which the - user's Postgres login is no longer valid. Please note that - if a user does not have a password defined in the - "pg_shadow" - table, the valid until date will not be checked - during user authentication. If this clause is omitted, - a NULL value is stored in "pg_shadow" - for this attribute, - and the login will be valid for all time. - - - + + + + + + username + + + + The name of the user. + + + + + + + password + + + + The WITH PASSWORD clause sets the user's password within + the "pg_shadow" table. For this reason, + "pg_shadow" is no + longer accessible to the instance of + Postgres that the + Postgres + user's password is initially set to NULL. + + + When a + user's password in the "pg_shadow" + table is NULL, user + authentication proceeds as it historically has (HBA, + PG_PASSWORD, etc). However, if a password is set for a + user, a new authentication system supplants any other + configured for the Postgres + instance, and the password + stored in the "pg_shadow" table is used + for authentication. + For more details on how this authentication system + functions see pg_crypt(3). If the WITH PASSWORD clause is + omitted, the user's password is set to the empty + string which equates to a NULL value in the authentication + system mentioned above. + + + + + + + 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. + + + + + + + CREATEUSER/NOCREATEUSER + + + + These clauses determine whether a user will be permitted to + create new + users in an instance of Postgres. + Omitting this clause will set the user's value of this + attribute to be NOCREATEUSER. + + + + + + + groupname + + + + A name of a group into which to insert the user as a new member. + + + + + + + abstime + + + + The VALID UNTIL clause sets an absolute time after which the + user's Postgres + login is no longer valid. Please note that + if a user does not have a password defined in the + "pg_shadow" + table, the valid until date will not be checked + during user authentication. If this clause is omitted, + a NULL value is stored in "pg_shadow" + for this attribute, + and the login will be valid for all time. + + + - + - - - 1998-09-21 - - + <refsect2 id="R2-SQL-CREATEUSER-2"> + <refsect2info> + <date>1998-09-21</date> + </refsect2info> + <title> Outputs - - - - - - - CREATE USER - - - - Message returned if the command completes successfully. - - - - - - ERROR: removeUser: user "username" does not exist - - - - if "username" not found. - - I don't understand this and I don't know how to get - this error message. - - - - - + + + + + + + CREATE USER + + + + Message returned if the command completes successfully. + + + + + + + ERROR: removeUser: user "username" does not exist + + + + if "username" not found. + + I don't understand this and I don't know how to get + this error message. + + + + + + - - - 1998-09-21 - - + <refsect1 id="R1-SQL-CREATEUSER-1"> + <refsect1info> + <date>1998-09-21</date> + </refsect1info> + <title> Description - - + + CREATE USER will add a new user to an instance of Postgres. - - + + The new user will be given a usesysid of: 'SELECT MAX(usesysid) + 1 FROM pg_shadow'. This means that @@ -196,18 +209,18 @@ CREATE USER username for any given user, use the "createuser" script provided with the Postgres distribution. - + - - - 1998-09-21 - - + <refsect2 id="R2-SQL-CREATEUSER-3"> + <refsect2info> + <date>1998-09-21</date> + </refsect2info> + <title> Notes - - + + CREATE USER statement is a Postgres language extension. - + Use DROP USER or ALTER USER statements to remove or modify a user account. @@ -229,68 +242,67 @@ CREATE USER username | valuntil | abstime | 4 | +--------------------------+--------------------------+-------+ - + - - + <refsect1 id="R1-SQL-CREATEUSER-2"> + <title> Usage - - + + Create a user with no password: - - + + CREATE USER jonathan - - + + Create a user with a password: - - + + CREATE USER davide WITH PASSWORD jw8s0F4 - + Create a user with a password, whose account is valid until the end of 2001. Note that after one second has ticked in 2002, the account is not valid: - + CREATE USER miriam WITH PASSWORD jw8s0F4 VALID UNTIL 'Jan 1 2002' - + Create an account where the user can create databases: - + CREATE USER manuel WITH PASSWORD jw8s0F4 CREATEDB - + - + - - + <refsect1 id="R1-SQL-CREATEUSER-3"> + <title> Compatibility - - - + + + - - - 1998-09-21 - - + <refsect2 id="R2-SQL-CREATEUSER-4"> + <refsect2info> + <date>1998-09-21</date> + </refsect2info> + <title> SQL92 - - + + There is no CREATE USER statement in SQL92. - + - - +