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:
table_name: The name of the analytical table that contains the column.It can be specified as a fully qualified name in the
schema_name.table_nameformat, or as just the table name. If you do not specify the analytical schema name, the current schema is used.column_name: The name of the column that is deleted.
Postgres Pro AXE performs the following actions:
Verifies input parameters and user privileges.
Creates a new entry in the
pga_snapshotmetadata table and sets theend_snapshotvalue for the column in thepga_columnmetadata table.Updates the
view_sqlvalue for the analytical table.
Example 26.4. Executing the metastore.delete_column stored procedure
SELECT metastore.delete_column('my_schema.testtable', 'second_col');