Add dummy CDB_Overviews SQL function for tests

This commit is contained in:
Javier Goizueta
2016-01-20 17:10:12 +01:00
parent b9f8812c98
commit 528574c550
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
-- Mockup for CDB_Overviews
CREATE OR REPLACE FUNCTION CDB_Overviews(table_name text)
RETURNS TABLE(z integer, overview_table text)
AS $$
BEGIN
IF table_name = 'test_table_overviews' THEN
RETURN QUERY
SELECT 1 AS z, 'test_table_overviews_ov1'::text AS overviw_table
UNION ALL
SELECT 2 AS z, 'test_table_overviews_ov2'::text AS overviw_table;
ELSE
RETURN;
END IF;
END
$$ LANGUAGE PLPGSQL;