Dropuser
Delete aPostgreSQLuser accounts that need to be described are only superuser or withCreateroleThe user of the permission can execute the command, and if you want to remove the superuser, you can only execute the command through the Superuser's identity. This command is used in the following ways:
dropuser [option ...] [Username]
1.List of command-line options:
Options |
Description |
-e (--echo) |
echo dropuser The generated command and sends it to the server. |
-i (--interactive) |
Prompt before doing any destructive action. |
-h ( --host=host ) |
specify postgresql host name of the server. |
-p (--port=port) |
Specifies the listener port of the server, if not specified, is the default 5432 |
-u (--username= username) |
The login user name for this operation. |
-w (--no-password) |
If the current logged-on user does not have a password, You can specify this option to log in directly. |
2. Application Example:
# deletes the specified user directly.
[Email protected] ~]$ DROPUSER-E-I testwjw02-p 36985
Role "Testwjw02" would be permanently removed.
Is you sure? (y/n) Y
DROP ROLE testwjw02;
# When you delete a specified user, the command gives you a hint to avoid accidental operation.
This article is from the "10931853" blog, please be sure to keep this source http://wujianwei.blog.51cto.com/10931853/1970767
The Dropuser of PostgreSQL