Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dapollak committed Sep 16, 2024
1 parent 956d0f5 commit d57c50b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion macros/utils/cross_db_utils/get_profile_creation_query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ BEGIN
WHERE nspname NOT IN ('pg_catalog', 'information_schema') -- Exclude system schemas
LOOP
-- Grant USAGE privilege on each schema to the specified user
EXECUTE 'GRANT USAGE ON SCHEMA ' || schema_name.nspname || ' TO ' || user_name;
IF schema_name.nspname NOT IN ('pg_automv', 'pg_auto_copy', 'pg_s3', 'pg_mv') AND NOT CHARINDEX('/', schema_name.nspname) THEN
EXECUTE 'GRANT USAGE ON SCHEMA ' || schema_name.nspname || ' TO ' || user_name;
END IF;
END LOOP;
END;
$$;
Expand Down

0 comments on commit d57c50b

Please sign in to comment.