create_user.hlp
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:2k
- .pgaw:Help.f.t insert end "CREATE USER" {bold} " 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 Postgres users' usesysids will not correspond to their operating system(OS)
- user ids. The exception to this rule is the 'postgres' user, whose OS user id is used as the usesysid during the initdb process. If you still want the OS user id and the usesysid to match for any
- given user, use the "createuser" script provided with the Postgres distribution.
- " {} "Synopsis" {bold} "
- CREATE USER username
- [ WITH PASSWORD password ]
- [ CREATEDB | NOCREATEDB ]
- [ CREATEUSER | NOCREATEUSER ]
- [ IN GROUP groupname [, ...] ]
- [ VALID UNTIL 'abstime' ]
-
- " {code} "Usage" {bold} "
- Create a user with no password:
- " {} " CREATE USER jonathan
- " {code} "
- Create a user with a password:
- " {} " CREATE USER davide WITH PASSWORD jw8s0F4
- " {code} "
- 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'
- " {code} "
- Create an account where the user can create databases:
- " {} " CREATE USER manuel WITH PASSWORD jw8s0F4 CREATEDB
- " {code} "Notes" {bold} "
- CREATE USER statement is a Postgres language extension.
- Use DROP USER or ALTER USER statements to remove or modify a user account.
- Refer to the pg_shadow table for further information.
- " {} "
- Table = pg_shadow
- +--------------------------+--------------------------+-------+
- | Field | Type | Length|
- +--------------------------+--------------------------+-------+
- | usename | name | 32 |
- | usesysid | int4 | 4 |
- | usecreatedb | bool | 1 |
- | usetrace | bool | 1 |
- | usesuper | bool | 1 |
- | usecatupd | bool | 1 |
- | passwd | text | var |
- | valuntil | abstime | 4 |
- +--------------------------+--------------------------+-------+
- " {code}