Re: SQL Property Graph Queries (SQL/PGQ)
| От | Ashutosh Bapat |
|---|---|
| Тема | Re: SQL Property Graph Queries (SQL/PGQ) |
| Дата | |
| Msg-id | CAExHW5stjrQwS1gXagy_5xmkAvKg_8QHwV=31vLD1O40y-mQiw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: SQL Property Graph Queries (SQL/PGQ) (Peter Eisentraut <peter@eisentraut.org>) |
| Ответы |
Re: SQL Property Graph Queries (SQL/PGQ)
|
| Список | pgsql-hackers |
On Mon, Dec 8, 2025 at 9:24 PM Peter Eisentraut <peter@eisentraut.org> wrote: > > On 02.12.25 11:00, Ashutosh Bapat wrote: > >> When you create future patches, consider using the git format-patch -v > >> option. > >> > > I am still using timestamp as a version but passing it to -v instead > > of treating it as a suffix. I like datestamp as versionstamp for the > > reasons mentioned upthread. > > Date stamps are great, but why is there a hyphen between the "v" and the > number? I was using -v=<version number> instead of -v <version number>. Fixed. > > I have committed the parse.pl patch, mainly to test it out so that we > don't have surprises later. (I had problems in the past making it work > with older Perl versions, but things seems to have shifted forward now.) > It can live on its own, I think. +1. Buildfarm seems to be happy with the change. > > It looks like undirected matching -[ ]- (without arrows) doesn't work > correctly. It seems to just match in one direction. I don't see any > tests. Is this implemented? > -[]- is called full edge any direction <full edge any direction> ::= <minus left bracket> <element pattern filler> <right bracket minus> ~[]~ is defined as full edge undirected <full edge undirected> ::= <tilde left bracket> <element pattern filler> <right bracket tilde> The patch supports full edge any direction since [1] in response to Ajay Pal's report. Such a pattern matches edges in both the directions. There's also a test -- edges directed in both ways - to and from v2 SELECT * FROM GRAPH_TABLE (g1 MATCH (v1 IS vl2)-[conn]-(v2) COLUMNS (v1.vname AS v1name, conn.ename AS cname, v2.vname AS v2name)); v1name | cname | v2name --------+-------+-------- v21 | e122 | v12 v22 | e121 | v11 v22 | e231 | v32 (3 rows) SELECT * FROM GRAPH_TABLE (g1 MATCH (v1 IS vl2)-(v2) COLUMNS (v1.vname AS v1name, v2.vname AS v2name)); v1name | v2name --------+-------- v21 | v12 v22 | v11 v22 | v32 (3 rows) it's matching edges to and from vertices in v2. For example e121 is an edge from v11 to v22 whereas e231 is an edge from v22 to v32. We do not support full edge undirected. gram.y doesn't have grammar for the same. In fact, I don't think we have a way to specify undirected edges in the property graph DDL itself. Do you think we should implement ~[ ] ~? > Also, make sure the role names in graph_table_rls.sql start with regress_: > > CREATE USER graph_rls_alice NOLOGIN; > +WARNING: roles created by regression test cases should have names > starting with "regress_" > > (This is the FreeBSD CI failure.) > Thanks for pointing that out. I can reproduce the failure on my laptop. Fixed in the attached patch. I have used regress_graph_rls_ as a user or role name prefix. It's a bit long but I see other tests also using longer names regress_file_fdw_superuser. If we want a shorter name we could use regress_pg_rls (pg: for property graph) but that can be easily confused with PostgreSQL. [1] https://www.postgresql.org/message-id/CAExHW5vqo7iTcVznspb3HHD87Ps3Q%3DJF6_gg%2Bh5mhyuwhd3Q4Q%40mail.gmail.com -- Best Wishes, Ashutosh Bapat
Вложения
В списке pgsql-hackers по дате отправления: