DROP ROLE
Function
DROP ROLE deletes a specified role.
Precautions
If a "role is being used by other users" error is displayed when you run DROP ROLE, it might be that threads cannot respond to signals in a timely manner during the CLEAN CONNECTION process. As a result, connections are not completely cleared. In this case, you need to run CLEAN CONNECTION again.
 
    - Be cautious when using DROP OBJECT (e.g., DATABASE, USER/ROLE, SCHEMA, TABLE, VIEW) as it may cause data loss, especially with CASCADE deletions. Always back up data before proceeding.
 - For more information about development and design proposal, see Development and Design Proposal.
 
Syntax
         1
          | 
        
         DROP ROLE [ IF EXISTS ] role_name [, ...];  | 
       
Parameter Description
| 
         Parameter  | 
       
         Description  | 
       
         Value Range  | 
      
|---|---|---|
| 
         IF EXISTS  | 
       
         Sends a notice instead of an error if the specified role does not exist.  | 
       
         -  | 
      
| 
         role_name  | 
       
         Specifies the name of the role to be deleted.  | 
       
         An existing role.  | 
      
Examples
Delete manager role.
         1
          | 
        
         DROP ROLE manager;  | 
       
Helpful Links
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.