DROP DIRECTORY
Description
Deletes a directory.
Precautions
- When enable_access_server_directory is set to off, only the initial user is allowed to delete the directory object.
- When enable_access_server_directory is set to on, a user with the SYSADMIN permission, a directory object owner, a user granted the DROP permission for a directory, or a user who inherits permissions from the built-in role gs_role_directory_drop can delete a directory object.
- The DIRECTORY object cannot be used in a PDB.
Syntax
DROP DIRECTORY [ IF EXISTS ] directory_name;
Parameters
- directory_name
Specifies the name of the directory to be deleted.
Value range: an existing directory name
- IF EXISTS
If the directory object does not exist, a NOTICE message is displayed.
Examples
-- Create a directory object. gaussdb=# CREATE OR REPLACE DIRECTORY dir as '/tmp/'; -- Delete the directory object. gaussdb=# DROP DIRECTORY dir;
Helpful Links
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.