Can I pass the name of a view as parameter of a function? Example:
CREATE OR REPLACE FUNCTION example_test(test type_view) return void as $$
BEGIN
start_ts = CLOCK_TIMESTAMP();
REFRESH MATERIALIZED VIEW test;
GET DIAGNOSTICS total_rows = ROW_COUNT;
INSERT INTO control_dw_monitoring (name, start_time, end_time, total)
VALUES ('view points that never contacted', start_ts, CLOCK_TIMESTAMP(), total_rows);
END
$$ language plpgsql;