WeSee
WeSee

Reputation: 3772

PostgreSQL: drop user Or drop role?

I created a read only user in PostgreSQL using the command line by:

CREATE USER xyz WITH ENCRYPTED PASSWORD 'xxx';
GRANT SELECT ON DATABASE mydb TO xyz;

In order to delete this user, what's the difference between

DROP USER xyz;

and

DROP ROLE xyz;

Upvotes: 0

Views: 328

Answers (1)

Nick Barnes
Nick Barnes

Reputation: 21356

There is no difference. From the docs:

DROP USER is simply an alternate spelling of DROP ROLE.

Upvotes: 3

Related Questions