-- Create a schema handling trial history. CREATE SCHEMA history; --Create role for anyone who needs to both select and insert on historical data CREATE ROLE history_writer; GRANT CONNECT ON DATABASE aact_db to history_writer; GRANT USAGE ON SCHEMA history TO history_writer; GRANT INSERT,SELECT ON ALL TABLES IN SCHEMA http TO history_writer; --Create role for anyone who only needs selection access to historical data, such as for analysis CREATE ROLE history_reader; GRANT CONNECT ON DATABASE aact_db to history_reader; GRANT USAGE ON SCHEMA history TO history_reader; GRANT SELECT ON ALL TABLES IN SCHEMA http TO history_reader; /* History Tables Below is where I would construct the parsed trial history tables that I need. */