1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

doc: Add PROPERTY GRAPH to the access privilege tables

The SELECT privilege can be granted on a property graph, and its
privileges can be examined with psql's \dp command, but property
graphs were missing from both summary tables in the "Privileges"
section: the applicable object types for SELECT in the privilege
abbreviations table, and the per-object-type row in the summary of
access privileges table.  Add the missing entries so the tables match
the actual behavior described for the SELECT privilege and in GRANT.

While at it, also add a test for \dp on a property graph.

Author: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAOzEurScgwLDXQmNFnDZANGAMMiva9GnLH_kO8qGtGVHUvVk2A%40mail.gmail.com
This commit is contained in:
Peter Eisentraut
2026-08-04 10:31:55 +02:00
parent fa62d4f6ea
commit 63c3bbb39f
3 changed files with 16 additions and 0 deletions

View File

@@ -2615,6 +2615,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
<entry><literal>r</literal> (<quote>read</quote>)</entry> <entry><literal>r</literal> (<quote>read</quote>)</entry>
<entry> <entry>
<literal>LARGE OBJECT</literal>, <literal>LARGE OBJECT</literal>,
<literal>PROPERTY GRAPH</literal>,
<literal>SEQUENCE</literal>, <literal>SEQUENCE</literal>,
<literal>TABLE</literal> (and table-like objects), <literal>TABLE</literal> (and table-like objects),
table column table column
@@ -2783,6 +2784,12 @@ REVOKE ALL ON accounts FROM PUBLIC;
<entry>none</entry> <entry>none</entry>
<entry><literal>\dconfig+</literal></entry> <entry><literal>\dconfig+</literal></entry>
</row> </row>
<row>
<entry><literal>PROPERTY GRAPH</literal></entry>
<entry><literal>r</literal></entry>
<entry>none</entry>
<entry><literal>\dp</literal></entry>
</row>
<row> <row>
<entry><literal>SCHEMA</literal></entry> <entry><literal>SCHEMA</literal></entry>
<entry><literal>UC</literal></entry> <entry><literal>UC</literal></entry>

View File

@@ -3208,6 +3208,14 @@ select * from graph_table (ptg1 match (is atest5) COLUMNS (1 as value)) limit 0;
grant select on property graph ptg1 to regress_priv_user2; grant select on property graph ptg1 to regress_priv_user2;
set session role regress_priv_user2; set session role regress_priv_user2;
\dp ptg1
Access privileges
Schema | Name | Type | Access privileges | Column privileges | Policies
--------+------+----------------+-----------------------------------------+-------------------+----------
public | ptg1 | property graph | regress_priv_user1=r/regress_priv_user1+| |
| | | regress_priv_user2=r/regress_priv_user1 | |
(1 row)
select * from graph_table (ptg1 match (is atest1) COLUMNS (1 as value)) limit 0; -- ok select * from graph_table (ptg1 match (is atest1) COLUMNS (1 as value)) limit 0; -- ok
value value
------- -------

View File

@@ -1892,6 +1892,7 @@ create property graph ptg1
select * from graph_table (ptg1 match (is atest5) COLUMNS (1 as value)) limit 0; -- ok select * from graph_table (ptg1 match (is atest5) COLUMNS (1 as value)) limit 0; -- ok
grant select on property graph ptg1 to regress_priv_user2; grant select on property graph ptg1 to regress_priv_user2;
set session role regress_priv_user2; set session role regress_priv_user2;
\dp ptg1
select * from graph_table (ptg1 match (is atest1) COLUMNS (1 as value)) limit 0; -- ok select * from graph_table (ptg1 match (is atest1) COLUMNS (1 as value)) limit 0; -- ok
-- select privileges on property graph but not table -- select privileges on property graph but not table
select * from graph_table (ptg1 match (is atest5) COLUMNS (1 as value)) limit 0; -- fails select * from graph_table (ptg1 match (is atest5) COLUMNS (1 as value)) limit 0; -- fails