On Tue, Jul 14, 2026 at 7:28 PM Shinya Kato <[email protected]> wrote:

> Hi hackers,
>
> Since SQL/PGQ was committed, the SELECT privilege can be granted on a
> property graph, but property graphs are missing from the two summary
> tables in the "Privileges" section of ddl.sgml.
>
> The description of the SELECT privilege in that section already
> mentions property graphs, and GRANT lists PROPERTY GRAPH as a
> grantable object, yet the reference tables that follow do not:
> - The privilege abbreviations table does not list PROPERTY GRAPH among
> the object types the SELECT privilege applies to.
> - The "Summary of Access Privileges" table has no PROPERTY GRAPH row.
>

Thanks Shinya.

I just added a missing test for \dp on a property graph. Document change
looks good.

PFA patch with that change.

-- 
Best Wishes,
Ashutosh Bapat
From fbed16aa90c6a49d43c3cadcc4446069b5fc3aba Mon Sep 17 00:00:00 2001
From: Shinya Kato <[email protected]>
Date: Tue, 14 Jul 2026 20:42:23 +0900
Subject: [PATCH v20260730 5/5] 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 <[email protected]>
Reviewed-by: Ashutosh Bapat <[email protected]>
Discussion: https://postgr.es/m/caozeurscgwldxqmnfndzangammiva9gnlh_ko8qgtgvhuvv...@mail.gmail.com
---
 doc/src/sgml/ddl.sgml                    | 7 +++++++
 src/test/regress/expected/privileges.out | 8 ++++++++
 src/test/regress/sql/privileges.sql      | 1 +
 3 files changed, 16 insertions(+)

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 5e8c270ab3a..9006b947e74 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -2615,6 +2615,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
       <entry><literal>r</literal> (<quote>read</quote>)</entry>
       <entry>
        <literal>LARGE OBJECT</literal>,
+       <literal>PROPERTY GRAPH</literal>,
        <literal>SEQUENCE</literal>,
        <literal>TABLE</literal> (and table-like objects),
        table column
@@ -2783,6 +2784,12 @@ REVOKE ALL ON accounts FROM PUBLIC;
       <entry>none</entry>
       <entry><literal>\dconfig+</literal></entry>
      </row>
+     <row>
+      <entry><literal>PROPERTY GRAPH</literal></entry>
+      <entry><literal>r</literal></entry>
+      <entry>none</entry>
+      <entry><literal>\dp</literal></entry>
+     </row>
      <row>
       <entry><literal>SCHEMA</literal></entry>
       <entry><literal>UC</literal></entry>
diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out
index fd18549e84e..5e3c9510490 100644
--- a/src/test/regress/expected/privileges.out
+++ b/src/test/regress/expected/privileges.out
@@ -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;
 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
  value 
 -------
diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql
index 6e0686da131..d3e87fa617f 100644
--- a/src/test/regress/sql/privileges.sql
+++ b/src/test/regress/sql/privileges.sql
@@ -1892,6 +1892,7 @@ create property graph ptg1
 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;
 set session role regress_priv_user2;
+\dp ptg1
 select * from graph_table (ptg1 match (is atest1) COLUMNS (1 as value)) limit 0; -- ok
 -- select privileges on property graph but not table
 select * from graph_table (ptg1 match (is atest5) COLUMNS (1 as value)) limit 0; -- fails
-- 
2.34.1

Reply via email to