ALTER PROJECTION RENAME

Initiates a rename operation on the specified projection.

Syntax

ALTER PROJECTION [[database.]schema.]projection RENAME TO new‑name 

Parameters

schema

Specifies a schema, by default public. If schema is any schema other than public, you must supply the schema name. For example:

myschema.thisDbObject

If you specify a database, it must be the current database.

projection

The projection to change. See Projection Naming for projection name conventions.

new‑name

The new projection name.

Privileges

Non-superuser, CREATE and USAGE on the schema and one of the following:

  • Anchor table owner
  • ALTER privilege on the anchor table

Examples

=> CREATE TABLE tbl (x integer, y integer);
CREATE TABLE
=> CREATE PROJECTION tbl_p AS SELECT x from tbl;
CREATE PROJECTION
=> ALTER PROJECTION tbl_p RENAME to new_tbl_p;
ALTER PROJECTION