table of contents
ALTER TABLESPACE(7) | PostgreSQL 16.4 Documentation | ALTER TABLESPACE(7) |
NAME¶
ALTER_TABLESPACE - change the definition of a tablespace
SYNOPSIS¶
ALTER TABLESPACE name RENAME TO new_name ALTER TABLESPACE name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER } ALTER TABLESPACE name SET ( tablespace_option = value [, ... ] ) ALTER TABLESPACE name RESET ( tablespace_option [, ... ] )
DESCRIPTION¶
ALTER TABLESPACE can be used to change the definition of a tablespace.
You must own the tablespace to change the definition of a tablespace. To alter the owner, you must also be able to SET ROLE to the new owning role. (Note that superusers have these privileges automatically.)
PARAMETERS¶
name
new_name
new_owner
tablespace_option
EXAMPLES¶
Rename tablespace index_space to fast_raid:
ALTER TABLESPACE index_space RENAME TO fast_raid;
Change the owner of tablespace index_space:
ALTER TABLESPACE index_space OWNER TO mary;
COMPATIBILITY¶
There is no ALTER TABLESPACE statement in the SQL standard.
SEE ALSO¶
CREATE TABLESPACE (CREATE_TABLESPACE(7)), DROP TABLESPACE (DROP_TABLESPACE(7))
2024 | PostgreSQL 16.4 |