2016-01-21 00:10:12 +08:00
|
|
|
-- Mockup for CDB_Overviews
|
2016-01-26 18:38:21 +08:00
|
|
|
CREATE OR REPLACE FUNCTION CDB_Overviews(table_names regclass[])
|
|
|
|
RETURNS TABLE(base_table regclass, z integer, overview_table regclass)
|
2016-01-21 00:10:12 +08:00
|
|
|
AS $$
|
|
|
|
BEGIN
|
2016-01-26 18:38:21 +08:00
|
|
|
IF (SELECT 'test_table_overviews'::regclass = ANY (table_names)) THEN
|
2016-01-21 00:10:12 +08:00
|
|
|
RETURN QUERY
|
2016-01-26 22:08:55 +08:00
|
|
|
SELECT 'test_table_overviews'::regclass AS base_table, 1 AS z, '_vovw_1_test_table_overviews'::regclass AS overview_table
|
2016-01-21 00:10:12 +08:00
|
|
|
UNION ALL
|
2016-01-26 22:08:55 +08:00
|
|
|
SELECT 'test_table_overviews'::regclass AS base_table, 2 AS z, '_vovw_2_test_table_overviews'::regclass AS overview_table;
|
2016-01-21 00:10:12 +08:00
|
|
|
ELSE
|
|
|
|
RETURN;
|
|
|
|
END IF;
|
|
|
|
END
|
|
|
|
$$ LANGUAGE PLPGSQL;
|
2016-01-28 00:40:12 +08:00
|
|
|
|
|
|
|
CREATE OR REPLACE FUNCTION CDB_ZoomFromScale(scaleDenominator numeric) RETURNS int AS $$
|
|
|
|
BEGIN
|
|
|
|
RETURN 0;
|
|
|
|
END
|
|
|
|
$$ LANGUAGE plpgsql IMMUTABLE;
|