ALTER DIRECTORY

Function

ALTER DIRECTORY modifies a directory.

Precautions

  • Currently, only the directory owner can be changed.
  • The owner can only be a user with the sysadmin permission.

Syntax

ALTER DIRECTORY directory_name
    OWNER TO new_owner;

Parameter Description

directory_name

Specifies the name of a directory to be modified. The value must be an existing directory name.

Examples

-- Create a directory.
postgres=# CREATE OR REPLACE DIRECTORY  dir  as '/tmp/';

-- Change the owner of the directory.
postgres=# ALTER DIRECTORY dir OWNER TO system;

-- Delete the directory.
postgres=# DROP DIRECTORY dir;

Helpful Links

CREATE DIRECTORY and DROP DIRECTORY

Feedback
编组 3备份
    openGauss 2024-05-06 00:44:54
    cancel