Re: SQL Property Graph Queries (SQL/PGQ)

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Ajay Pal <ajay(dot)pal(dot)k(at)gmail(dot)com>
Cc: Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Date: 2024-11-19 16:38:36
Message-ID: 3b190de8-910a-4091-82f9-e98cf562d832@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 05/11/2024 16:41, Ashutosh Bapat wrote:
> On Wed, Aug 28, 2024 at 3:48 PM Ashutosh Bapat
> <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>> Patches 0001 - 0006 are same as the previous set.
>> 0007 - fixes all the problems you reported till now and also the one I
>> found. The commit message describes the fixes in detail.
> Here's an updated patchset based on the latest HEAD.

I have been looking at this patchset from a user's and standards'
perspective and I am quite pleased with what I am seeing for the most
part.  I have not been looking much at the code itself, although I do
plan on reviewing some of the code in the future.

There are a few things that stick out to me.

1.
I don't see any way to view the structure of of a property graph.  For
example:

postgres=# CREATE TABLE objects (id INTEGER, color VARCHAR, shape
VARCHAR, size INTEGER);
CREATE TABLE
postgres=# CREATE PROPERTY GRAPH propgraph VERTEX TABLES (objects KEY
(id) PROPERTIES ALL COLUMNS);
CREATE PROPERTY GRAPH
postgres=# \dG propgraph
                      List of relations
      Schema       |   Name    | Type      |    Owner
-------------------+-----------+----------------+-------------
 graph_table_tests | propgraph | property graph | vik.fearing
(1 row)

postgres=# \d propgraph
Property graph "graph_table_tests.propgraph"
 Column | Type
--------+------

I don't really know what to do with that.

2.
There is a missing newline in the \? help of psql.
    HELP0("  \\dFt[+] [PATTERN]      list text search templates\n");
    HELP0("  \\dg[S+] [PATTERN]      list roles\n");
    HELP0("  \\dG[S+] [PATTERN]      list property graphs");   <---
    HELP0("  \\di[S+] [PATTERN]      list indexes\n");
    HELP0("  \\dl[+]                 list large objects, same as
\\lo_list\n");

3.
The noise word "ARE" is missing from the <element table properties
alternatives>clause.
There is also no support for the EXCEPT clause, but I imagine that can
be added at a later time.

4.
I notice that tables in pg_catalog are not allowed in a property graph. 
What are the reasons for this?  It is true that this might cause some
problems with upgrades if a column is removed, but it shouldn't cause
trouble for columns being added.  That case works with user tables.

5.

The ascii art characters (I am loathe to call them operators) allow junk
in between them.  For example:

    MATCH (c) -[:lbl]-> (d)

can be written as

    MATCH (c) -
        [:lbl] -
        /* a comment here */
        > (d)

Is that intentional?

----

I will continue to review this feature from the user's perspective. 
Thank you for working on it, I am very excited to get this in.

--

Vik Fearing

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2024-11-19 16:43:53 Re: Optimizing FastPathTransferRelationLocks()
Previous Message Bertrand Drouvot 2024-11-19 16:28:55 Re: per backend I/O statistics