Re: SQL Property Graph Queries (SQL/PGQ) - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: SQL Property Graph Queries (SQL/PGQ)
Date
Msg-id CAExHW5seMxDsLT7beuOQ81ssYrT7hAxxpyC5moF-_EsVF-XGPQ@mail.gmail.com
Whole thread Raw
In response to Re: SQL Property Graph Queries (SQL/PGQ)  (Junwang Zhao <zhjwpku@gmail.com>)
List pgsql-hackers
On Fri, Jan 9, 2026 at 10:22 AM Junwang Zhao <zhjwpku@gmail.com> wrote:
>
> Hi Ashutosh,
>
> Here is a brief review of
> v20260102-0001-WIP-SQL-Property-Graph-Queries-SQL-PGQ.patch
>
> + <sect1 id="infoschema-pg-element-table-key-columns">
> +  <title><literal>pg_element_table_key_columns</literal></title>
> +
> +  <para>
> +   The view <literal>pg_element_key_columns</literal> identifies which columns
> +   are part of the keys of the element tables of property graphs defined in
> +   the current database.  Only those property graphs are shown that the
> +   current user has access to (by way of being the owner or having some
> +   privilege).
> +  </para>
>
> pg_element_key_columns should be pg_element_table_key_columns
>

Done.

> + <sect1 id="infoschema-pg-element-table-properties">
> +  <title><literal>pg_element_table_properties</literal></title>
> +
> +  <para>
> +   The view <literal>pg_element_table_labels</literal> shows the definitions
> +   of the properties for the element tables of property graphs defined in the
> +   current database.  Only those property graphs are shown that the current
> +   user has access to (by way of being the owner or having some privilege).
> +  </para>
>
> pg_element_table_labels here should be pg_element_table_properties, I
> guess this was due to copy-paste.

Done.

>
> + <sect1 id="infoschema-pg-property-graph-privileges">
> +  <title><literal>pg_property_graph_privileges</literal></title>
> +
> +  <para>
> +   The view <literal>property_graph_privileges</literal> identifies all
> +   privileges granted on property graphs to a currently enabled role or by a
> +   currently enabled role.  There is one row for each combination of property
> +   graph, grantor, and grantee.
> +  </para>
> +
> +  <table>
> +   <title><structname>property_graph_privileges</structname> Columns</title>
> +   <tgroup cols="1">
>
> These two property_graph_privileges should be pg_property_graph_privileges
>

Done.

> +    <varlistentry>
> +     <term><literal>ADD {VERTEX|NODE|EDGE|RELATIONSHIP} TABLES</literal></term>
> +     <listitem>
> +      <para>
> +       This form adds new vertex or edge tables, using the same syntax as
> +       <link linkend="sql-create-property-graph"><command>CREATE PROPERTY
> +       GRAPH</command></link>.
> +      </para>
> +     </listitem>
> +    </varlistentry>
> +
> +    <varlistentry>
> +     <term><literal>DROP {VERTEX|NODE|EDGE|RELATIONSHIP}
> TABLES</literal></term>
> +     <listitem>
> +      <para>
> +       This form removes a vertex or edge table from the property graph.
> +       (Only the association of the table with the graph is removed.  The table
> +       itself is not dropped.)
> +      </para>
> +     </listitem>
> +    </varlistentry>
>
> I think this *drop* action can drop multiple vertex or edge tables, so maybe
> change 'This form removes a vertex or edge table from the property graph' to
> 'This form removes vertex or edge tables from the property graph'. And to
> be consistent, we can also reword 'This form adds new vertex or edge tables'
> to 'This form adds new vertex or edge tables to the property graph'.

Done.

>
> + * operated on.  CREATE PROPERTY GROUP and other ALTER PROPERTY GRAPH variants
> + * check all labels.
>
> should be CREATE PROPERTY GRAPH
>

Done.

> + /*
> + * Prepare operands and cast them to the types required by the
> + * equality operator. Similar to PK/FK qauls, referenced vertex key is
> + * used as left operand and referencing edge key is used as right
> + * operand.
> + */
>
> qauls -> quals
>

Done.

Thanks a lot for pointing out these corrections. I have applied them
in my repository. Will be available in the next set of patches.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: PATCH: warn about, and deprecate, clear text passwords
Next
From: Ashutosh Bapat
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)