The Dropuser of PostgreSQL

Source: Internet
Author: User
Tags postgresql

   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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.