mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
This privilege is required to do Streaming Replication, instead of superuser, making it possible to set up a SR slave that doesn't have write permissions on the master. Superuser privileges do NOT override this check, so in order to use the default superuser account for replication it must be explicitly granted the REPLICATION permissions. This is backwards incompatible change, in the interest of higher default security.
79 lines
2.4 KiB
Plaintext
79 lines
2.4 KiB
Plaintext
<!--
|
|
doc/src/sgml/ref/create_user.sgml
|
|
PostgreSQL documentation
|
|
-->
|
|
|
|
<refentry id="SQL-CREATEUSER">
|
|
<refmeta>
|
|
<refentrytitle>CREATE USER</refentrytitle>
|
|
<manvolnum>7</manvolnum>
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>CREATE USER</refname>
|
|
<refpurpose>define a new database role</refpurpose>
|
|
</refnamediv>
|
|
|
|
<indexterm zone="sql-createuser">
|
|
<primary>CREATE USER</primary>
|
|
</indexterm>
|
|
|
|
<refsynopsisdiv>
|
|
<synopsis>
|
|
CREATE USER <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
|
|
|
|
<phrase>where <replaceable class="PARAMETER">option</replaceable> can be:</phrase>
|
|
|
|
SUPERUSER | NOSUPERUSER
|
|
| CREATEDB | NOCREATEDB
|
|
| CREATEROLE | NOCREATEROLE
|
|
| CREATEUSER | NOCREATEUSER
|
|
| INHERIT | NOINHERIT
|
|
| LOGIN | NOLOGIN
|
|
| REPLICATION | NOREPLICATION
|
|
| CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
|
|
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
|
|
| VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>'
|
|
| IN ROLE <replaceable class="PARAMETER">role_name</replaceable> [, ...]
|
|
| IN GROUP <replaceable class="PARAMETER">role_name</replaceable> [, ...]
|
|
| ROLE <replaceable class="PARAMETER">role_name</replaceable> [, ...]
|
|
| ADMIN <replaceable class="PARAMETER">role_name</replaceable> [, ...]
|
|
| USER <replaceable class="PARAMETER">role_name</replaceable> [, ...]
|
|
| SYSID <replaceable class="PARAMETER">uid</replaceable>
|
|
</synopsis>
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1>
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
<command>CREATE USER</command> is now an alias for
|
|
<xref linkend="sql-createrole">.
|
|
The only difference is that when the command is spelled
|
|
<command>CREATE USER</command>, <literal>LOGIN</> is assumed
|
|
by default, whereas <literal>NOLOGIN</> is assumed when
|
|
the command is spelled
|
|
<command>CREATE ROLE</command>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Compatibility</title>
|
|
|
|
<para>
|
|
The <command>CREATE USER</command> statement is a
|
|
<productname>PostgreSQL</productname> extension. The SQL standard
|
|
leaves the definition of users to the implementation.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>See Also</title>
|
|
|
|
<simplelist type="inline">
|
|
<member><xref linkend="sql-createrole"></member>
|
|
</simplelist>
|
|
</refsect1>
|
|
</refentry>
|