~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/create_user.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
$PostgreSQL$
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-CREATEUSER">
 
7
 <refmeta>
 
8
  <refentrytitle id="sql-createuser-title">CREATE USER</refentrytitle>
 
9
  <manvolnum>7</manvolnum>
 
10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
11
 </refmeta>
 
12
 
 
13
 <refnamediv>
 
14
  <refname>CREATE USER</refname>
 
15
  <refpurpose>define a new database role</refpurpose>
 
16
 </refnamediv>
 
17
 
 
18
 <indexterm zone="sql-createuser">
 
19
  <primary>CREATE USER</primary>
 
20
 </indexterm>
 
21
 
 
22
 <refsynopsisdiv>
 
23
<synopsis>
 
24
CREATE USER <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
 
25
 
 
26
where <replaceable class="PARAMETER">option</replaceable> can be:
 
27
    
 
28
      SUPERUSER | NOSUPERUSER
 
29
    | CREATEDB | NOCREATEDB
 
30
    | CREATEROLE | NOCREATEROLE
 
31
    | CREATEUSER | NOCREATEUSER
 
32
    | INHERIT | NOINHERIT
 
33
    | LOGIN | NOLOGIN
 
34
    | CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
 
35
    | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
 
36
    | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>' 
 
37
    | IN ROLE <replaceable class="PARAMETER">rolename</replaceable> [, ...]
 
38
    | IN GROUP <replaceable class="PARAMETER">rolename</replaceable> [, ...]
 
39
    | ROLE <replaceable class="PARAMETER">rolename</replaceable> [, ...]
 
40
    | ADMIN <replaceable class="PARAMETER">rolename</replaceable> [, ...]
 
41
    | USER <replaceable class="PARAMETER">rolename</replaceable> [, ...]
 
42
    | SYSID <replaceable class="PARAMETER">uid</replaceable> 
 
43
</synopsis>
 
44
 </refsynopsisdiv>
 
45
 
 
46
 <refsect1>
 
47
  <title>Description</title>
 
48
 
 
49
  <para>
 
50
   <command>CREATE USER</command> is now an alias for
 
51
   <xref linkend="sql-createrole" endterm="sql-createrole-title">.
 
52
   The only difference is that when the command is spelled
 
53
   <command>CREATE USER</command>, <literal>LOGIN</> is assumed
 
54
   by default, whereas <literal>NOLOGIN</> is assumed when
 
55
   the command is spelled
 
56
   <command>CREATE ROLE</command>.
 
57
  </para>
 
58
 </refsect1>
 
59
 
 
60
 <refsect1>
 
61
  <title>Compatibility</title>
 
62
  
 
63
  <para>
 
64
   The <command>CREATE USER</command> statement is a
 
65
   <productname>PostgreSQL</productname> extension.  The SQL standard
 
66
   leaves the definition of users to the implementation.
 
67
  </para>
 
68
 </refsect1>
 
69
 
 
70
 <refsect1>
 
71
  <title>See Also</title>
 
72
 
 
73
  <simplelist type="inline">
 
74
   <member><xref linkend="sql-createrole" endterm="sql-createrole-title"></member>
 
75
  </simplelist>
 
76
 </refsect1>
 
77
</refentry>