---------------------------
-- GROUP oik_group_super --
---------------------------
CREATE ROLE oik_group_super;
GRANT ALL ON SCHEMA oik TO oik_group_super;
GRANT SELECT ON ALL TABLES IN SCHEMA oik TO oik_group_super;

---------------------------
-- GROUP oik_group_public --
---------------------------
CREATE ROLE oik_group_public;
GRANT USAGE ON SCHEMA oik TO oik_group_public;
--REVOKE SELECT ON ALL TABLES IN SCHEMA oik FROM oik_group_public;
GRANT SELECT ON oik_retro TO oik_group_public;
GRANT SELECT ON v_retro TO oik_group_public;

---------------------------
-- USER test
---------------------------
CREATE USER test PASSWORD '123' IN ROLE oik_group_public;
GRANT SELECT ON oik_retro_ts TO test;
GRANT SELECT ON oik_retro_tt TO test;
GRANT SELECT ON v_cur_ts TO test;
GRANT SELECT ON v_cur_tt TO test;
