18.2. Deleting an Analytical Schema (metastore.remove_schema) #
Important
Analytical schemas associated with analytical tables or views cannot be deleted.
Required privileges: Postgres Pro AXE administrator only. For a full list of stored procedures and privileges, refer to Section 12.1.
Execute the following command on the Postgres Pro AXE server:
SELECT metastore.remove_schema('schema_name') ON CONFLICT DO NOTHING;
Where schema_name is the name of the analytical schema that must be deleted.
Postgres Pro AXE performs the following actions:
Checks input parameters and user privileges.
Creates a new entry in the
pga_snapshotmetadata table and sets theend_snapshotfield for the analytical schema in thepga_schemametadata table.Sets the
end_snapshotfield for entries associated with the analytical schema in other metadata tables.
Example 18.2. Executing the metastore.remove_schema Stored Procedure
SELECT metastore.remove_schema('schema_example') ON CONFLICT DO NOTHING;