DROP DIRECTORY
Function
DROP Directory deletes a synonym.
Precautions
When enable_access_server_directory is set to off, only the initial user is allowed to delete directory objects. When enable_access_server_directory is set to on, a user with the SYSADMIN permission, the owner of the directory object, a user who is granted with the DROP permission of the directory, or a user who inherits the gs_role_directory_drop permission of the built-in role can delete directory objects.
Syntax
DROP DIRECTORY [ IF EXISTS ] directory_name;
Parameter Description
directory_name
Specifies the name of the directory to be deleted.
Value range: an existing directory name
Examples
-- Create a directory.
openGauss=# CREATE OR REPLACE DIRECTORY dir as '/tmp/';
-- Delete a directory.
openGauss=# DROP DIRECTORY dir;
Helpful Links
Feedback