23.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 18.1.

Execute the following command on the Postgres Pro AXE server:

  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. Checks input parameters and user privileges.

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

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

Example 23.2. Executing the metastore.remove_schema Stored Procedure

  SELECT metastore.remove_schema('schema_example');