Document CDB_DropOverviews

This commit is contained in:
Javier Goizueta 2016-01-12 16:20:11 +01:00
parent d352e1c463
commit a9e2d19918
2 changed files with 22 additions and 2 deletions

View File

@ -11,8 +11,9 @@ The statement timeout may need to be adjusted before using this function,
as overview creation for large tables is a time-consuming operation. as overview creation for large tables is a time-consuming operation.
The `CDB_Overviews` function can be used determine what overview tables The `CDB_Overviews` function can be used determine what overview tables
exist for a given dataset table and which zoom levels correspond tt exist for a given dataset table and which zoom levels correspond to it.
The `CDB_DropOverviews` remove a dataset's existing overviews.
### CDB_CreateOverviews ### CDB_CreateOverviews
@ -49,7 +50,8 @@ CDB_CreateOverviews(table_name, ref_z_strategy, reduction_strategy)
### CDB_Overviews ### CDB_Overviews
Obtain overview metadata for a given table (existing overviews) Obtain overview metadata for a given table (existing overviews).
The returned relation will be empty if the table has no overviews.
```sql ```sql
SELECT CDB_Overviews('table_name'); SELECT CDB_Overviews('table_name');
@ -61,3 +63,17 @@ SELECT CDB_Overviews('table_name');
CDB_Overviews(table_name) CDB_Overviews(table_name)
* **table_name** regclass, table to obtain existing overviews for * **table_name** regclass, table to obtain existing overviews for
### CDB_DropOverviews
Remove the overviews of a table, if present.
```sql
SELECT CDB_DropOverviews('table_name');
```
#### Arguments
CDB_Overviews(table_name)
* **table_name** regclass, table for which to drop existing overviews.

View File

@ -1,3 +1,7 @@
-- Remove a dataset's existing overview tables.
-- Scope: public
-- Parameters:
-- reloid: oid of the table.
CREATE OR REPLACE FUNCTION CDB_DropOverviews(reloid REGCLASS) CREATE OR REPLACE FUNCTION CDB_DropOverviews(reloid REGCLASS)
RETURNS void RETURNS void
AS $$ AS $$