RESTORE_FLEXTABLE_DEFAULT_KEYS_TABLE_AND_VIEW
Restores the _keys
table and the _view
. The function also links the _keys
table with its associated flex table, in cases where either table is dropped. The function also indicates whether it restored one or both objects.
Syntax
restore_flextable_default_keys_table_and_view('
flex_table')
Arguments
flex_table |
The name of a flex table. |
Examples
This example shows how to invoke this function with an existing flex table, restoring both the _keys
table and _view
:
=> select restore_flextable_default_keys_table_and_view('darkdata');
restore_flextable_default_keys_table_and_view
----------------------------------------------------------------------------------
The keys table public.darkdata_keys was restored successfully.
The view public.darkdata_view was restored successfully.
(1 row)
This example illustrates that the function restored darkdata_view
, but that darkdata_keys
did not need restoring:
=> select restore_flextable_default_keys_table_and_view('darkdata'); restore_flextable_default_keys_table_and_view ------------------------------------------------------------------------------------ The keys table public.darkdata_keys already exists and is linked to darkdata. The view public.darkdata_view was restored successfully. (1 row)
After restoring the _keys
table, there is no content. To populate the flex keys, call the COMPUTE_FLEXTABLE_KEYS meta function.
=> SELECT * FROM darkdata_keys; key_name | frequency | data_type_guess ----------+-----------+----------------- (0 rows)