Prohibit GRANT ... ON TABLE on a property graph

We allowed GRANT ... ON TABLE on sequences for backward compatibility.
We don't need to consider backward compatibility in case of property
graphs since we will be prohibiting its usage on property graph from
the very release which introduced property graphs.

Change regression tests that used GRANT ... ON [TABLE] on property
graphs to use GRANT ... ON PROPERTY GRAPH instead.

While here, add the missing RELKIND_PROPGRAPH cases in
pg_class_aclmask_ext() and in the object-type switch in
ExecGrant_Relation() so that the default ACL and the objtype passed to
restrict_and_check_grant() are correct.

Author: Ashutosh Bapat <[email protected]>
Reviewed-by: Noah Misch <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fa62d4f6ea7529aa75105aa1ed3b43477ab365a0

Modified Files
--------------
src/backend/catalog/aclchk.c                        | 20 +++++++++++++++++++-
src/test/regress/expected/create_property_graph.out |  3 +++
src/test/regress/expected/graph_table_rls.out       |  6 +++---
src/test/regress/expected/privileges.out            |  4 ++--
src/test/regress/sql/create_property_graph.sql      |  1 +
src/test/regress/sql/graph_table_rls.sql            |  6 +++---
src/test/regress/sql/privileges.sql                 |  4 ++--
7 files changed, 33 insertions(+), 11 deletions(-)

Reply via email to