25.2. Renaming an Analytical Table (metastore.rename_table) #
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.rename_table('table_name', 'new_table_name');
Where:
table_name: The current analytical table name.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.new_table_name: The new unique analytical table name.
Postgres Pro AXE performs the following actions:
Verifies input parameters and user privileges.
Updates the
table_namevalue for the analytical table in thepga_tablemetadata table.Updates the
view_sqlvalue for the analytical table.
Example 25.3. Executing the metastore.rename_table stored procedure
SELECT metastore.rename_table('testtable', 'testtable1');