↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQL Commands

DROP USER

remove a database role

English manual coverage begins with PostgreSQL 6.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

anchor
SQL-DROPUSER
file
sql-dropuser.html
lang
en
name
DROP USER
purpose
remove a database role
purpose zh
移除一个数据库角色
sections same as
Unknown
slug
18
synopsis html
DROP USER [ IF EXISTS ] <em class="replaceable"><code>name</code></em> [, ...]
synopsis text
DROP USER [ IF EXISTS ] name [, ...]

Syntax

DROP USER [ IF EXISTS ] name [, ...]
Syntax diagrams

Read left to right. Branches are choices, bypasses are optional, loops repeat. Select an underlined parameter to open its rule.

DROP USER IF EXISTS name ,

Definition PG 18

DROP USER [ IF EXISTS ] name [, ...]

Description

DROP USER is simply an alternate spelling of DROP ROLE.

Compatibility

The DROP USER statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation.

See Also

DROP ROLE

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:3f13c40cf053e6253043b26dbfbfcacb8c0ae77ffd0ac9794440052cb409b722

Text language: en · wiki-repair-20261023:3f13c40cf053e6253043b26dbfbfcacb8c0ae77ffd0ac9794440052cb409b722