Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / doc / src / sgml / ref / create_user.sgml
blob80a73a2022b0d776468319592fcf5d494c542176
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
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>
13 <refnamediv>
14 <refname>CREATE USER</refname>
15 <refpurpose>define a new database role</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-createuser">
19 <primary>CREATE USER</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <synopsis>
24 CREATE USER <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
26 where <replaceable class="PARAMETER">option</replaceable> can be:
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>
46 <refsect1>
47 <title>Description</title>
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>
60 <refsect1>
61 <title>Compatibility</title>
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>
70 <refsect1>
71 <title>See Also</title>
73 <simplelist type="inline">
74 <member><xref linkend="sql-createrole" endterm="sql-createrole-title"></member>
75 </simplelist>
76 </refsect1>
77 </refentry>