1
1
<!--
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 $
3
3
Postgres documentation
4
4
-->
5
5
@@ -23,8 +23,10 @@ Postgres documentation
23
23
<date>1999-07-20</date>
24
24
</refsynopsisdivinfo>
25
25
<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> ] ]
28
30
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
29
31
[ IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
30
32
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
@@ -49,11 +51,28 @@ CREATE USER<replaceable class="PARAMETER"> username</replaceable>
49
51
</listitem>
50
52
</varlistentry>
51
53
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
+
52
71
<varlistentry>
53
72
<term><replaceable class="parameter">password</replaceable></term>
54
73
<listitem>
55
74
<para>
56
- The WITH PASSWORD clause sets the user's password within
75
+ The PASSWORD clause sets the user's password within
57
76
the "<filename>pg_shadow</filename>" table. For this reason,
58
77
<filename>"pg_shadow</filename>" is no
59
78
longer accessible to the instance of
@@ -173,30 +192,9 @@ CREATE USER
173
192
</title>
174
193
<para>
175
194
CREATE USER will add a new user to an instance of
176
- <productname>Postgres </productname>.
195
+ <productname>PostgreSQL </productname>.
177
196
</para>
178
197
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
-
200
198
<refsect2 id="R2-SQL-CREATEUSER-3">
201
199
<refsect2info>
202
200
<date>1998-09-21</date>
@@ -216,19 +214,17 @@ SELECT MAX(usesysid) + 1 FROM pg_shadow;
216
214
Refer to the <filename>pg_shadow</filename> table for further information.
217
215
</para>
218
216
<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 |
232
228
</programlisting>
233
229
</refsect2>
234
230
</refsect1>
0 commit comments