27.2. Deleting an Analytical Schema (metastore.remove_schema) #

Important

Analytical schemas associated with analytical tables or Postgres Pro views cannot be deleted.

Required privileges: Postgres Pro AXE administrator only. For more information about stored procedures and privileges, refer to Section 22.1.

Execute the following command:

  SELECT metastore.remove_schema('schema_name');

Where schema_name is the name of the analytical schema to delete.

Postgres Pro AXE performs the following actions:

  1. Verifies input parameters and user privileges.

  2. Creates a new entry in the pga_snapshot metadata table and sets the end_snapshot value for the analytical schema in the pga_schema metadata table.

  3. Sets the end_snapshot value for entries associated with the analytical schema in other metadata tables.

Example 27.2. Executing the metastore.remove_schema stored procedure

  SELECT metastore.remove_schema('schema_example');