Re: SQL Property Graph Queries (SQL/PGQ)

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>, Junwang Zhao <zhjwpku@gmail.com>, Vik Fearing <vik@postgresfriends.org>, Ajay Pal <ajay.pal.k@gmail.com>, Imran Zaheer <imran.zhir@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-25T13:52:21Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix some typos and make small stylistic improvements

  2. Cleanup users and roles in graph_table_rls test

  3. Dump labels in reproducible order

  4. SQL Property Graph Queries (SQL/PGQ)

  5. Factor out constructSetOpTargetlist() from transformSetOperationTree()

  6. Sort out table_open vs. relation_open in rewriter

  7. Rename grammar nonterminal to simplify reuse

  8. Make ecpg parse.pl more robust with braces

  9. Don't lock partitions pruned by initial pruning

  10. Remove pg_regex_collation

  11. Use auxv to check for CRC32 instructions on ARM.

  12. Fix inappropriate uses of atol()

  13. Remove unnecessary array object_classes[] in dependency.c

Attachments

I have done a rough review of the patch set version 20251120.

- There are "No newline at end of file" warnings from git diff for a 
couple of files:

       contrib/pg_overexplain/sql/pg_overexplain.sql
       src/test/regress/sql/graph_table_rls.sql

Please fix those in the next patch set, and maybe check your editor 
settings.

- Attached are two small patches with some small fixes I found in 
passing.  (I think some of them were also reported by Junwang Zhao in 
the meantime.)

- In the test files, especially src/test/regress/sql/graph_table.sql, 
there are wildly different SQL styles (capitalization, formatting) used, 
depending on who added the test case (I guess).  Let's keep that more 
consistent.

- In src/backend/parser/analyze.c, the extracted function 
constructSetOpTargetlist() needs a detailed comment.

- I'm not so sure about the semantics chosen in the patch "Access 
permissions on property graph".  I think according to the SQL standard, 
once you have access to the property graph, you don't need access to the 
underlying tables as well.  I guess you did this to align with how views 
work?  We might need to think about this a bit more, and document 
whatever the conclusion is.  But for now it's just small amount of code 
affected.

I think you could collapse all the patches into one patch now.  I have 
reviewed all the incremental patches and they all look ok to me.  I have 
made some notes about which things I want to review in more detail, such 
as the access control issue, but that doesn't need to be kept as a 
separate patch.

When you create future patches, consider using the git format-patch -v 
option.

And then you can also just gzip the patch.  That should make it even 
smaller than the .zip file.