ALTER DIRECTORY
Description
Alters directory attributes.
Precautions
- Currently, only the directory owner can be changed.
- When enable_access_server_directory is set to off, only the initial user is allowed to change the directory owner. When enable_access_server_directory is set to on, users with the SYSADMIN permission and the directory object owner can change the directory object owner, and the user who changes the owner is required to be a member of the new owner.
Syntax
ALTER DIRECTORY directory_name OWNER TO new_owner;
Parameters
- directory_name
Specifies the name of a directory to be modified. The value must be an existing directory name.
- new_owner
Specifies the new owner of the directory.
Examples
-- Create a directory. openGauss=# CREATE OR REPLACE DIRECTORY dir as '/tmp/'; -- Create a user. openGauss=# CREATE USER system PASSWORD '********'; -- Change the owner of the directory. openGauss=# ALTER DIRECTORY dir OWNER TO system; -- Drop a directory. openGauss=# 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.