Re: SQL Property Graph Queries (SQL/PGQ)

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Junwang Zhao <zhjwpku(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Ajay Pal <ajay(dot)pal(dot)k(at)gmail(dot)com>, Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Date: 2025-08-11 13:42:55
Message-ID: eef2bf59-0512-4b81-a381-24ed13fa1030@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have browsed this patch set a bit to get myself up to date.

General thoughts:

This is a large patch set, and it's not going to be perfect at the first
try. Especially, some of the parsing rules, query semantics, that kind
of thing. So I'm thinking that we should aim at integrating this with
an understanding that it would be somewhat experimental, and then
iterate on some of the details in the tree. Obviously, that would still
require that the overall architecture is ok, that it doesn't crash, that
it satisfies security requirements. Also, it should as much as possible
follow the "if you don't use it, it doesn't affect you" rule. So I'm
specifically looking at where the patch intersects with existing code in
critical ways, especially in parse analysis. I want to spend more time
reviewing that in particular. Much of the rest of patch is
almost-boilerplate: New DDL commands, new catalogs, associated tests and
documentation. It looks a lot, but most of it is not very surprising.

I found two areas where a bit more work could be done to separate the
new code from existing code:

src/backend/utils/cache/inval.c: This looks suspicious. The existing
code only deals with very fundamental catalogs such as pg_class and
pg_index. It doesn't feel right to hardcode additional arguably very
high-level PGQ-related catalogs there. We should think of a different
approach here.

src/test/regress/sql/rowsecurity.sql: I think it would be better to
separate the new test cases into a separate file. This test file is
already large and complicated, and sprinkling a bunch of more stuff all
over the place is going to make review and maintenance more complicated.

We also need to make sure that property graphs have security features
equivalent to views. For example, I suspect we need to integrate them
with restrict_nonsystem_relation_kind. There might be other similar
things, to be checked.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2025-08-11 13:59:53 Re: alter check constraint enforceability
Previous Message Matheus Alcantara 2025-08-11 13:41:08 Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue