Re: SQL Property Graph Queries (SQL/PGQ)

Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>

From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Junwang Zhao <zhjwpku@gmail.com>
Cc: Vik Fearing <vik@postgresfriends.org>, Ajay Pal <ajay.pal.k@gmail.com>, Imran Zaheer <imran.zhir@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-01-28T10:26:45Z
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

On Fri, Jan 24, 2025 at 9:16 PM Junwang Zhao <zhjwpku@gmail.com> wrote:
>
> I figured out it's because I have `-DWRITE_READ_PARSE_PLAN_TREES` this option,
> removing this option clears the warning, but I'm not sure if this is a
> hidden issue.
>

Thanks for the hint. I found the issue and the fix appears in 0004.
Some members of RangeTblEntry were not being handled in read/out
functions.

> >
> > 0001-0009 patches are the same as the previous set sans mergeconflict fixes.
> > 0010 - is test for \dGx - to make sure that the extended format output
> > works with \dG. We may decide not to have this patch in the final
> > commit. But no harm in being there til that point.
>
> I have some changes based on the latest patch set. I attached two patches with
> the following summary.
>
> 0001:
> - doc: some of the query in ddl.sgml can not be executed

The standard seems to require a property reference to be qualified by
element pattern variable, even if the property is referenced within
the same element pattern bound to the variable. Hence I accepted your
document fixes which qualify property reference with element pattern
variable.

However, I didn't understand why you changed a LABEL name from order to order_.

> - after path factor was introduced, some comments doesn't apply

Thanks pointing those out. Accepted after rephrasing those and also
correcting some related comments.

>
> 0002:
> - add a get_propgraph_element_alias_name function and do some trivial refactor
>

I see you have added some negative tests - object not found tests, but
I didn't see positive tests. Hence I haven't added those changes in
the attached patchset. But we certainly need those changes. You may
want to submit a patch with positive tests. That code needs to be
fixed before committing anyway.


--
Best Wishes,
Ashutosh Bapat