PostgreSQL – Rename Tablespace

Below is the syntax to rename a tablespace in Postgresql database where tablespace_name is the current name of the tablespace to be renamed and new_tablespace_name is the new name for the tablespace.

ALTER TABLESPACE tablespace_name RENAME TO new_tablespace_name

See also  PostgreSQL - Create Function example