New answers tagged

0 votes

GRANT SELECT to all tables in postgresql

DO $$ DECLARE schemaname text; BEGIN FOR schemaname IN (SELECT nspname FROM pg_namespace) LOOP EXECUTE 'GRANT USAGE, SELECT ON ALL TABLES IN SCHEMA ' || schemaname || ' TO user'; ...

Top 50 recent answers are included