16.2. Renaming an Analytical Table #
Execute the following query:
SELECT metastore.rename_table('schema_name.current_table_name' or 'current_table_name', 'new_table_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.
current_table_name: The current analytical table name.new_table_name: The new unique analytical table name.
Example 16.3.
SELECT metastore.rename_table('testtable', 'testtable1');
Once the query is executed, pgpro_metastore performs the following actions:
Verifies user privileges.
Updates the
table_namevalue for the analytical table in thepga_tablemetadata table.Updates the
view_sqlvalue for the analytical table.