GRANT USAGE ON SCHEMA display TO PUBLIC;

ALTER DEFAULT PRIVILEGES IN SCHEMA display GRANT SELECT, UPDATE, INSERT, DELETE ON TABLES TO xdb_admin;
ALTER DEFAULT PRIVILEGES IN SCHEMA display GRANT SELECT, UPDATE, INSERT, DELETE ON TABLES TO xdb_viewer;
ALTER DEFAULT PRIVILEGES IN SCHEMA display GRANT SELECT, UPDATE, INSERT, DELETE ON TABLES TO xdb_logger;

GRANT ALL ON SCHEMA display TO xdb_viewer;
GRANT SELECT, UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA display TO xdb_viewer;
GRANT ALL ON SCHEMA display TO xdb_admin;
GRANT ALL ON ALL TABLES IN SCHEMA display TO xdb_admin;
GRANT ALL ON SCHEMA display TO xdb_logger;
GRANT SELECT, UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA display TO xdb_logger;

ALTER TABLE display.display_collar OWNER TO xdb_admin;
GRANT SELECT, TRIGGER ON TABLE display.display_collar TO xdb_viewer;
GRANT SELECT, UPDATE, INSERT, DELETE, TRIGGER ON TABLE display.display_collar TO xdb_logger;