Skip to content
Snippets Groups Projects
Unverified Commit 13df79cd authored by Eric Jensen's avatar Eric Jensen Committed by GitHub
Browse files

Include postgresql tables that are visible through column grants instead of...

Include postgresql tables that are visible through column grants instead of full table grants for simple questions (#40034)

Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
parent 4e9d14b1
Branches
Tags
No related merge requests found
......@@ -948,9 +948,9 @@
" NULL as role,"
" t.schemaname as schema,"
" t.objectname as table,"
" pg_catalog.has_table_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'update') as update,"
" pg_catalog.has_table_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'select') as select,"
" pg_catalog.has_table_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'insert') as insert,"
" pg_catalog.has_any_column_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'update') as update,"
" pg_catalog.has_any_column_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'select') as select,"
" pg_catalog.has_any_column_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'insert') as insert,"
" pg_catalog.has_table_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'delete') as delete"
" from ("
" select schemaname, tablename as objectname from pg_catalog.pg_tables"
......
......@@ -1325,7 +1325,7 @@
"CREATE MATERIALIZED VIEW \"dotted.schema\".\"dotted.materialized_view\" AS SELECT 'hello world';"
"DROP ROLE IF EXISTS privilege_rows_test_example_role;"
"CREATE ROLE privilege_rows_test_example_role WITH LOGIN;"
"GRANT SELECT ON \"dotted.schema\".\"dotted.table\" TO privilege_rows_test_example_role;"
"GRANT SELECT (id) ON \"dotted.schema\".\"dotted.table\" TO privilege_rows_test_example_role;"
"GRANT UPDATE ON \"dotted.schema\".\"dotted.table\" TO privilege_rows_test_example_role;"
"GRANT SELECT ON \"dotted.schema\".\"dotted.view\" TO privilege_rows_test_example_role;"
"GRANT SELECT ON \"dotted.schema\".\"dotted.materialized_view\" TO privilege_rows_test_example_role;"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment