This PostgreSQL tutorial explains how to use the PostgreSQL DROP USER statement with syntax and examples.
The DROP USER statement is used to remove a user from the PostgreSQL database.
The syntax for the DROP USER statement in PostgreSQL is:
DROP USER user_name;
Parameters or Arguments
The name of the user to remove from the PostgreSQL database.
- If the user that you wish to delete owns a database, be sure to drop the database first and then drop the user.
Let's look at how to drop a user in PostgreSQL using the DROP USER statement.
DROP USER fastread.aitechtonic;
In this example, the DROP USER statement would drop the user called fastread.aitechtonic in the PostgreSQL database.