CREATE USER
CREATE USER — создать роль в базе данных
Синтаксис
CREATE USERимя
[ [ WITH ]параметр
[ ... ] ] Здесьпараметр
: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | REPLICATION | NOREPLICATION | BYPASSRLS | NOBYPASSRLS | CONNECTION LIMITпредел_подключений
| [ ENCRYPTED ] PASSWORD 'пароль
' | PASSWORD NULL | VALID UNTIL 'дата_время
' | IN ROLEимя_роли
[, ...] | IN GROUPимя_роли
[, ...] | ROLEимя_роли
[, ...] | ADMINимя_роли
[, ...] | USERимя_роли
[, ...] | SYSIDuid
Описание
Команда CREATE USER
теперь является просто синонимом CREATE ROLE. Единственное отличие в том, что для команды, записанной в виде CREATE USER
, по умолчанию подразумевается LOGIN
, а в виде CREATE ROLE
подразумевается NOLOGIN
.
Совместимость
Оператор CREATE USER
является расширением PostgreSQL. В стандарте SQL определение пользователей считается зависимым от реализации.
См. также
CREATE ROLE51.5. pg_amproc
#
The catalog pg_amproc
stores information about support functions associated with access method operator families. There is one row for each support function belonging to an operator family.
Table 51.5. pg_amproc
Columns
Column Type Description |
---|
Row identifier |
The operator family this entry is for |
Left-hand input data type of associated operator |
Right-hand input data type of associated operator |
Support function number |
OID of the function |
The usual interpretation of the amproclefttype
and amprocrighttype
fields is that they identify the left and right input types of the operator(s) that a particular support function supports. For some access methods these match the input data type(s) of the support function itself, for others not. There is a notion of “default” support functions for an index, which are those with amproclefttype
and amprocrighttype
both equal to the index operator class's opcintype
.