Enhance documentation, update comments

This commit is contained in:
Javier Goizueta 2016-01-12 12:08:41 +01:00
parent a2f6cb4c04
commit ccdf8de59e
2 changed files with 9 additions and 9 deletions

View File

@ -7,6 +7,8 @@ The *reduction* consists in a fewer number of records
and/or simplified record geometries.
Overviews are created through the `CDB_CreateOverviews`.
The statement timeout may need to be adjusted before using this function,
as overview creation for large tables is a time-consuming operation.
The `CDB_Overviews` function can be used determine what overview tables
exist for a given dataset table and which zoom levels correspond tt
@ -31,12 +33,14 @@ SELECT CDB_CreateOverviews('table_name');
CDB_CreateOverviews(table_name, ref_z_strategy, reduction_strategy)
* **table_name** regclass, table for which overviews will be generated
* **ref_z_strategy** regproc, function that provides the Z-scale strategy.
* **ref_z_strategy** regproc, optional function that provides
the Z-scale strategy.
It returns the base Z level for the dataset.
It should have these arguments:
- **table_name** regclass, table to compute the reference Z scale for
* **reduction_strategy** regproc, function that provides the reduction strategy
to generate an overview table from a table for a smaller scale (higher Z number).
* **reduction_strategy** regproc, optional function that provides
the reduction strategy to generate an overview table from a table
for a smaller scale (higher Z number).
It returns the name of the generated table.
It should have these arguments:
- **base_table_name** regclass, base table to be reduced.

View File

@ -257,9 +257,8 @@ AS $$
PERFORM _CDB_Add_Indexes(overview_table);
-- TODO: we'll need to store metadata somewhere to define
-- which overlay levels are available. Here we should add this metadata
-- (or replace existing metadata)
-- TODO: If metadata about existing overviews is to be stored
-- it should be done here (CDB_Overviews would consume such metadata)
END
$$ LANGUAGE PLPGSQL;
@ -417,7 +416,6 @@ AS $$
SELECT string_agg(s.column, ',') FROM (
SELECT * FROM cols
) AS s INTO columns;
RAISE NOTICE 'COLUMNS: %s', columns;
EXECUTE Format('DROP TABLE IF EXISTS %s CASCADE;', overview_rel);
@ -474,8 +472,6 @@ DECLARE
overview_tables REGCLASS[];
overviews_step integer := 1;
BEGIN
-- TODO: adjust statement_timeout here based on input table size?
-- Determine the referece zoom level
EXECUTE 'SELECT ' || quote_ident(refscale_strategy::text) || Format('(''%s'');', reloid) INTO ref_z;