dropuser

Name

dropuser  --  Removes a user account from a database.

Synopsis

dropuser [ options ] [ username ]
  

Parameters

-h, --host host

If you are connecting to a backend process running remotely, use this parameter to specify the hostname that the process is running on. If the process is local, specify that this parameter contains a local domain socket by prefixing the parameter value with a slash.

-p, --port port

This parameter takes the TCP/IP port number or local domain socket file the backend process is listening on.

-e, --echo

Pass this parameter to have all queries that dropuser generates print to the screen (as well as sent to the backend process).

-q, --quiet

Pass this parameter to have dropuser run in quiet mode; when running in quiet mode, no responses will be displayed.

-i, --interactive

Pass this parameter to have dropuser prompt you for permission before removing the user specified.

username

Use this parameter to specify the username you wish to remove from the backend process. This is a required parameter; if no username is specified, dropuser will prompt you for one.

Results

dropuser: deletion of user "username" failed

This message is displayed if the drop failed. More direct error information will appear if it exists; otherwise, the backend error message will be displayed. For help understanding any backend error messages you receive, examine DROP USER.

Description

Use the dropuser command for the same purpose as you would use the SQL command DROP USER: to remove a user account from a database of your specification. By using this script you can remove any user account from any database (to do this your account must be a superuser). Unlike the SQL DROP USER command, this command removes any databases that the user may have owned.

Examples

The following example demonstrates how to remove the user david.

$ dropuser david
DROP USER