Skip to content

Instantly share code, notes, and snippets.

@fire
Last active August 29, 2015 14:03
Show Gist options
  • Save fire/0bd8864db889ccbc1be7 to your computer and use it in GitHub Desktop.
Save fire/0bd8864db889ccbc1be7 to your computer and use it in GitHub Desktop.
# THESE DO NOT WORK.
# Grant permissions from all tables in database and is a base table to casino.
REVOKE SELECT, INSERT, UPDATE, DELETE
ON ALL TABLES IN SCHEMA public
from discourse;
GRANT select, insert, update, delete on ALL TABLES IN SCHEMA public TO discourse;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA <schema_name> TO <user>;
GRANT select, insert, update, delete on ALL TABLES IN SCHEMA public TO ghost;
GRANT select, insert, update, delete on ALL TABLES IN SCHEMA public from casino;
GRANT select, insert, update, delete ON TABLE users TO casino;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment