11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_user.sgml,v 1.9 1999/10/07 16:40:36 momjian Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_user.sgml,v 1.10 1999/11/30 03:57:23 momjian Exp $
33Postgres documentation
44-->
55
@@ -23,8 +23,10 @@ Postgres documentation
2323 <date>1999-07-20</date>
2424 </refsynopsisdivinfo>
2525 <synopsis>
26- CREATE USER<replaceable class="PARAMETER"> username</replaceable>
27- [ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
26+ CREATE USER <replaceable class="PARAMETER">username</replaceable>
27+ [ WITH
28+ [ SYSID <replaceable class="PARAMETER">uid</replaceable> ]
29+ [ PASSWORD <replaceable class="PARAMETER">password</replaceable> ] ]
2830 [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
2931 [ IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
3032 [ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
@@ -49,11 +51,28 @@ CREATE USER<replaceable class="PARAMETER"> username</replaceable>
4951 </listitem>
5052 </varlistentry>
5153
54+ <varlistentry>
55+ <term><replaceable class="parameter">uid</replaceable></term>
56+ <listitem>
57+ <para>
58+ The <literal>SYSID</literal> clause can be used to choose
59+ the <productname>PostgreSQL</productname> user id of the user
60+ that is being created. It is not at all necessary that those
61+ match the <acronym>UNIX</acronym> user ids, but some people
62+ choose to keep the numbers the same.
63+ </para>
64+ <para>
65+ If this is not specified, the highest assigned user id plus one
66+ will be used as default.
67+ </para>
68+ </listitem>
69+ </varlistentry>
70+
5271 <varlistentry>
5372 <term><replaceable class="parameter">password</replaceable></term>
5473 <listitem>
5574 <para>
56- TheWITH PASSWORD clause sets the user's password within
75+ The PASSWORD clause sets the user's password within
5776the "<filename>pg_shadow</filename>" table. For this reason,
5877<filename>"pg_shadow</filename>" is no
5978longer accessible to the instance of
@@ -173,30 +192,9 @@ CREATE USER
173192 </title>
174193 <para>
175194 CREATE USER will add a new user to an instance of
176- <productname>Postgres </productname>.
195+ <productname>PostgreSQL </productname>.
177196 </para>
178197
179- <para>
180- The new user will be given a <filename>usesysid</filename> of:
181-
182- <programlisting>
183- SELECT MAX(usesysid) + 1 FROM pg_shadow;
184- </programlisting>
185-
186- This means that
187- <productname>Postgres</productname> users' <filename>usesysid</filename>s will not
188- correspond to their operating
189- system(OS) user ids. The exception to this rule is
190- the <literal>postgres</literal> superuser, whose OS user id
191- is used as the
192- <filename>usesysid</filename> during the initdb process.
193- If you still want the
194- OS user id and the <filename>usesysid</filename> to match
195- for any given user,
196- use the <application>createuser</application> script provided with
197- the <productname>Postgres</productname> distribution.
198- </para>
199-
200198 <refsect2 id="R2-SQL-CREATEUSER-3">
201199 <refsect2info>
202200 <date>1998-09-21</date>
@@ -216,19 +214,17 @@ SELECT MAX(usesysid) + 1 FROM pg_shadow;
216214 Refer to the <filename>pg_shadow</filename> table for further information.
217215 </para>
218216 <programlisting>
219- Table = pg_shadow
220- +--------------------------+--------------------------+-------+
221- | Field | Type | Length|
222- +--------------------------+--------------------------+-------+
223- | usename | name | 32 |
224- | usesysid | int4 | 4 |
225- | usecreatedb | bool | 1 |
226- | usetrace | bool | 1 |
227- | usesuper | bool | 1 |
228- | usecatupd | bool | 1 |
229- | passwd | text | var |
230- | valuntil | abstime | 4 |
231- +--------------------------+--------------------------+-------+
217+ Table "pg_shadow"
218+ Attribute | Type | Extra
219+ -------------+---------+-------
220+ usename | name |
221+ usesysid | int4 |
222+ usecreatedb | bool |
223+ usetrace | bool |
224+ usesuper | bool |
225+ usecatupd | bool |
226+ passwd | text |
227+ valuntil | abstime |
232228 </programlisting>
233229 </refsect2>
234230 </refsect1>