ALTER_TABLESPACE
change the definition of a tablespace
- Provided by: postgresql-client-18 (Version: 18.3-1)
- Source: postgresql-18
- Report a bug
change the definition of a tablespace
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 [, ... ] )
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.)
name
new_name
new_owner
tablespace_option
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;
There is no ALTER TABLESPACE statement in the SQL standard.
CREATE TABLESPACE (CREATE_TABLESPACE(7)), DROP TABLESPACE (DROP_TABLESPACE(7))