ALTER SCHEMA

Change a schema definition.

Summary

ALTER SCHEMA name RENAME TO newname

ALTER SCHEMA name OWNER TO newowner

describe

ALTER SCHEMA Changes a schema definition.

Users must have this mode to use ALTER SCHEMA. To rename a schema, the user must also have CREATE privileges for the database. To change the owner, the user must also be a direct or indirect member of the newly owned role, and the role must have CREATE privileges on the database. Note: Superusers automatically have all these privileges.

Parameters

name

  • The name of the existing pattern.

newname

  • The new name of the pattern. New names cannot start with pg_, because these names are reserved for system mode.

newowner

  • New owner of this model.

compatibility

There is no ALTER SCHEMA statement in the SQL standard.

See also

CREATE SCHEMA, DROP SCHEMA