Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

DROP USER

Name

DROP USER -- Removes a PostgreSQL user.

Synopsis

DROP USER name

Parameters

name

The username of the PostgreSQL user you wish to remove.

Results

DROP USER

The message returned when a PostgreSQL user is successfully removed.

ERROR: DROP USER: user "name" does not exist

The error returned if the specified PostgreSQL user cannot be found on the connected host.

ERROR: DROP USER: user "name" owns database "database", cannot be removed

The error returned if a database called database still exists when you attempt to drop the name user. Any owned databases must first be removed.

Description

Use the DROP USER command to remove a user from a database. You are not allowed to remove a user that owns a database. All database objects the user owned will continue to exist within the database.

Note: To run this command from the command prompt, use dropuser, which is a wrapper application to the same SQL command (see Chapter 10 for more about this command).

Example

The following example permanently drops the PostgreSQL user named jonathan from the system:

template1=# DROP USER jonathan;
DROP

 
 
  Published courtesy of O'Reilly Design by Interspire