Changes the definition of a tablespace.

Syntax

ALTER TABLESPACE name RENAME TO newname

Parameters

Parameter Description
name The name of the tablespace.
newname The new name of the tablespace. The new name cannot start with the pg_ prefix. This prefix is reserved for system tablespace names.

Example

Change the name of a tablespace from empspace to employee_space:

ALTER TABLESPACE empspace RENAME TO employee_space;