I'm dealing with a migration of a django site, and I'd like make all tables read-only except for the django_session table. How can I do this?
REVOKE INSERT, UPDATE, DELETE, TRUNCATE
ON ALL TABLES IN SCHEMA public
FROM public, <target_role>;
Possibly add more roles to the list, but do not forget the role public.
Possibly add more schemas to the list, but do not forget the schema public.
Details in the manual.
Superusers (like postgres) ignore permissions. A trigger would be an alternative to include them, too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With