kostiantyn-nemchenko/postgres-inspector

Bloat estimation queries - grant schema-related privileges

kostiantyn-nemchenko opened this issue · 2 comments

Bloat estimation queries - grant schema-related privileges
DO $do$
DECLARE
    sch text;
BEGIN
    FOR sch IN SELECT nspname FROM pg_namespace
    LOOP
        EXECUTE format($$ GRANT USAGE ON SCHEMA %I TO your_role $$, sch);
    END LOOP;
END;
$do$;