DROP PROFILE

DROP PROFILE — удалить профиль аутентификации

Синтаксис

DROP PROFILE [ IF EXISTS ] имя

Описание

Команда DROP PROFILE удаляет указанный профиль. Выполнять эту команду разрешено только суперпользователям базы данных или пользователям с правами роли pg_manage_profiles.

Профиль нельзя удалить, если он используется в какой-либо базе данных в кластере; в этом случае выдаётся ошибка. Чтобы профиль можно было удалить, вы должны удалить все роли, которым он назначен, или переназначить им другой профиль. Для переназначения профиля воспользуйтесь командой ALTER ROLE.

Параметры

IF EXISTS

Не считать ошибкой, если профиль не существует. В этом случае будет выдано замечание.

имя

Имя профиля, подлежащего удалению.

Примеры

Удаление указанного профиля:

DROP PROFILE admin_profile;

DROP PROFILE

DROP PROFILE — remove an authentication profile

Synopsis

DROP PROFILE [ IF EXISTS ] name

Description

The DROP PROFILE command removes the specified profile. You must be a database superuser or have the privileges of the pg_manage_profiles role to use this command.

A profile cannot be removed if it is still referenced in any database of the cluster; if this is the case, an error is raised. Before dropping the profile, you must drop all the roles to which it is assigned, or assign another profile to them. Use the ALTER ROLE command if you need to reassign the profile.

Parameters

IF EXISTS

Do not throw an error if the profile does not exist. A notice is issued in this case.

name

The name of the profile to remove.

Examples

Drop the specified profile:

DROP PROFILE admin_profile;
FAQ