2016-01-21 00:10:12 +08:00
|
|
|
-- Mockup for CDB_Overviews
|
|
|
|
CREATE OR REPLACE FUNCTION CDB_Overviews(table_name text)
|
|
|
|
RETURNS TABLE(z integer, overview_table text)
|
|
|
|
AS $$
|
|
|
|
BEGIN
|
2016-01-21 20:33:45 +08:00
|
|
|
IF table_name = 'public.test_table_overviews' THEN
|
2016-01-21 00:10:12 +08:00
|
|
|
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;
|