17.4. Deleting a Column #
Execute the following query:
SELECT metastore.delete_column('schema_name.table_name' or 'table_name', 'column_name');
Where:
schema_name: The name of the analytical schema where the table is created.Optional parameter. If you do not specify it, the current schema is used.
table_name: The name of the analytical table where the column is created.column_name: The name of the column that is deleted.
Example 17.4.
SELECT metastore.delete_column('my_schema.testtable', 'second_col');
Once the query is executed, pgpro_metastore performs the following actions:
Verifies user privileges.
Creates a new entry in the
pga_snapshotmetadata table and specifies for the column theend_snapshotvalue in thepga_columnmetadata table.Updates the
view_sqlvalue for the analytical table.