Alter a schema

You can alter a schema to change its name, its authorization user, or the contents of the schema path.

The schema path specifies a comma-separated list of schemas that define a search path for routines such as user-defined functions, aggregates, libraries, and stored procedures. For example, to change the name of the schema, use the following command:

ALTER SCHEMA schema_name RENAME TO new_schema;

You cannot use the ALTER command to move the schema to a different database. Also, you cannot alter a schema if there are sessions that are connected to that schema.