]> begriffs open source - ai-pg/blob - full-docs/man7/CREATE_USER.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / CREATE_USER.7
1 '\" t
2 .\"     Title: CREATE USER
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "CREATE USER" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 CREATE_USER \- define a new database role
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 CREATE USER \fIname\fR [ [ WITH ] \fIoption\fR [ \&.\&.\&. ] ]
36
37 where \fIoption\fR can be:
38
39       SUPERUSER | NOSUPERUSER
40     | CREATEDB | NOCREATEDB
41     | CREATEROLE | NOCREATEROLE
42     | INHERIT | NOINHERIT
43     | LOGIN | NOLOGIN
44     | REPLICATION | NOREPLICATION
45     | BYPASSRLS | NOBYPASSRLS
46     | CONNECTION LIMIT \fIconnlimit\fR
47     | [ ENCRYPTED ] PASSWORD \*(Aq\fIpassword\fR\*(Aq | PASSWORD NULL
48     | VALID UNTIL \*(Aq\fItimestamp\fR\*(Aq
49     | IN ROLE \fIrole_name\fR [, \&.\&.\&.]
50     | IN GROUP \fIrole_name\fR [, \&.\&.\&.]
51     | ROLE \fIrole_name\fR [, \&.\&.\&.]
52     | ADMIN \fIrole_name\fR [, \&.\&.\&.]
53     | USER \fIrole_name\fR [, \&.\&.\&.]
54     | SYSID \fIuid\fR
55 .fi
56 .SH "DESCRIPTION"
57 .PP
58 \fBCREATE USER\fR
59 is now an alias for
60 \fBCREATE ROLE\fR\&. The only difference is that when the command is spelled
61 \fBCREATE USER\fR,
62 LOGIN
63 is assumed by default, whereas
64 NOLOGIN
65 is assumed when the command is spelled
66 \fBCREATE ROLE\fR\&.
67 .SH "COMPATIBILITY"
68 .PP
69 The
70 \fBCREATE USER\fR
71 statement is a
72 PostgreSQL
73 extension\&. The SQL standard leaves the definition of users to the implementation\&.
74 .SH "SEE ALSO"
75 CREATE ROLE (\fBCREATE_ROLE\fR(7))