Help Center/ GaussDB/ Developer Guide(Distributed_V2.0-3.x)/ SQL Reference/ SQL Syntax/ DROP DIRECTORY
Updated on 2025-08-19 GMT+08:00
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 with 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.
Syntax
1 | DROP DIRECTORY [ IF EXISTS ] directory_name; |
Parameters
- directory_name
Specifies the name of the directory to be deleted.
Value range: an existing directory name
Examples
1 2 3 4 5 | -- Create a directory. gaussdb=# CREATE OR REPLACE DIRECTORY dir as '/tmp/'; -- Delete a foreign table. gaussdb=# DROP DIRECTORY dir; |
Helpful Links
Parent topic: SQL Syntax
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.