26.4. Deleting a Column (metastore.delete_column) #

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.delete_column('table_name', 'column_name');

Where:

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 column in the pga_column metadata table.

  3. Updates the view_sql value for the analytical table.

Example 26.4. Executing the metastore.delete_column stored procedure

  SELECT metastore.delete_column('my_schema.testtable', 'second_col');