Re: SQL Property Graph Queries (SQL/PGQ)

2025-04-07 Thread Junwang Zhao
Hi Ashutosh, On Mon, Apr 7, 2025 at 1:19 PM Ashutosh Bapat wrote: > > On Sat, Apr 5, 2025 at 6:20 PM Junwang Zhao wrote: > > > > Hi Ashutosh and Peter, > > > > Since this PGQ feature won't be in PG 18, I'd like to raise a discussion of > > the possibility of implementing the quantifier feature,

Re: SQL Property Graph Queries (SQL/PGQ)

2025-04-06 Thread Ashutosh Bapat
On Sat, Apr 5, 2025 at 6:20 PM Junwang Zhao wrote: > > Hi Ashutosh and Peter, > > Since this PGQ feature won't be in PG 18, I'd like to raise a discussion of > the possibility of implementing the quantifier feature, which I think is a > quite useful feature in the graph database area. I agree tha

Re: SQL Property Graph Queries (SQL/PGQ)

2025-04-05 Thread Junwang Zhao
Hi Ashutosh and Peter, On Wed, Mar 12, 2025 at 12:31 PM Ashutosh Bapat wrote: > > Thanks > > On Tue, Mar 11, 2025 at 7:51 PM Junwang Zhao wrote: > > > > > Here is a new version with Amit's fix and my trivial refactors. > > > > 0001-0010 is the same as Ashutosh's last email > > 0011 is Amit's fix

Re: SQL Property Graph Queries (SQL/PGQ)

2025-03-15 Thread Junwang Zhao
Hi Amit, On Tue, Mar 11, 2025 at 5:06 PM Amit Langote wrote: > > Hi Ashutosh, Junwang, > > On Tue, Mar 11, 2025 at 4:22 PM Ashutosh Bapat > wrote: > > On Wed, Feb 26, 2025 at 8:04 PM Junwang Zhao wrote: > > > I added a trivial fix(v12-0014) that called table_open/table_close in > > > rewriteGra

Re: SQL Property Graph Queries (SQL/PGQ)

2025-03-11 Thread Ashutosh Bapat
Thanks On Tue, Mar 11, 2025 at 7:51 PM Junwang Zhao wrote: > > Here is a new version with Amit's fix and my trivial refactors. > > 0001-0010 is the same as Ashutosh's last email > 0011 is Amit's fix of the crash in ExecCheckPermissions I think that fix is correct and it fixes the crash. I need

Re: SQL Property Graph Queries (SQL/PGQ)

2025-03-11 Thread Amit Langote
Hi Ashutosh, Junwang, On Tue, Mar 11, 2025 at 4:22 PM Ashutosh Bapat wrote: > On Wed, Feb 26, 2025 at 8:04 PM Junwang Zhao wrote: > > I added a trivial fix(v12-0014) that called table_open/table_close in > > rewriteGraphTable, it now passed the regression test and cirrus ci test, > > but I'm not

Re: SQL Property Graph Queries (SQL/PGQ)

2025-02-25 Thread Vladlen Popolitov
Ashutosh Bapat писал(а) 2025-02-25 17:20: On Tue, Feb 25, 2025 at 3:17 PM Vladlen Popolitov wrote: Hi! I would ask about CREATE GRAPH PROPERTY. From my point of view it makes very strong check of types including check of typmod. Example: CREATE TABLE userslist ( user_id INT primary

Re: SQL Property Graph Queries (SQL/PGQ)

2025-02-25 Thread Ashutosh Bapat
On Tue, Feb 25, 2025 at 3:17 PM Vladlen Popolitov wrote: > > Hi! > > I would ask about CREATE GRAPH PROPERTY. From my point of view it makes > very strong > check of types including check of typmod. > > Example: > > CREATE TABLE userslist ( >user_id INT primary key, >name VARCHAR(40)

Re: SQL Property Graph Queries (SQL/PGQ)

2025-02-25 Thread Vladlen Popolitov
Hi! I would ask about CREATE GRAPH PROPERTY. From my point of view it makes very strong check of types including check of typmod. Example: CREATE TABLE userslist ( user_id INT primary key, name VARCHAR(40) ); CREATE TABLE groupslist ( group_id INT primary key, name VARCHAR(30)

Re: SQL Property Graph Queries (SQL/PGQ)

2025-02-09 Thread Ashutosh Bapat
On Thu, Feb 6, 2025 at 8:22 PM Junwang Zhao wrote: > > > > > > > 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

Re: SQL Property Graph Queries (SQL/PGQ)

2025-02-06 Thread Junwang Zhao
Hi Ashutosh, On Tue, Jan 28, 2025 at 6:17 PM Ashutosh Bapat wrote: > > On Fri, Jan 24, 2025 at 9:16 PM Junwang Zhao 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 > > hi

Re: SQL Property Graph Queries (SQL/PGQ)

2025-01-28 Thread Junwang Zhao
On Tue, Jan 28, 2025 at 7:03 PM Ashutosh Bapat wrote: > > On Tue, Jan 28, 2025 at 4:31 PM Junwang Zhao wrote: > > > > On Tue, Jan 28, 2025 at 6:17 PM Ashutosh Bapat > > wrote: > > > > > > On Fri, Jan 24, 2025 at 9:16 PM Junwang Zhao wrote: > > > > > > > > I figured out it's because I have `-DWR

Re: SQL Property Graph Queries (SQL/PGQ)

2025-01-28 Thread Ashutosh Bapat
On Tue, Jan 28, 2025 at 4:31 PM Junwang Zhao wrote: > > On Tue, Jan 28, 2025 at 6:17 PM Ashutosh Bapat > wrote: > > > > On Fri, Jan 24, 2025 at 9:16 PM Junwang Zhao wrote: > > > > > > I figured out it's because I have `-DWRITE_READ_PARSE_PLAN_TREES` this > > > option, > > > removing this option

Re: SQL Property Graph Queries (SQL/PGQ)

2025-01-28 Thread Junwang Zhao
On Tue, Jan 28, 2025 at 6:17 PM Ashutosh Bapat wrote: > > On Fri, Jan 24, 2025 at 9:16 PM Junwang Zhao 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. >

Re: SQL Property Graph Queries (SQL/PGQ)

2025-01-24 Thread Junwang Zhao
On Fri, Jan 24, 2025 at 11:46 PM Junwang Zhao wrote: > > On Fri, Jan 24, 2025 at 9:31 PM Ashutosh Bapat > wrote: > > > > On Sun, Jan 19, 2025 at 6:45 PM Junwang Zhao wrote: > > > > > > Hi Ashutosh, > > > > > > On Wed, Jan 1, 2025 at 5:02 PM Ashutosh Bapat > > > wrote: > > > > > > > > On Wed, Ja

Re: SQL Property Graph Queries (SQL/PGQ)

2025-01-24 Thread Junwang Zhao
On Fri, Jan 24, 2025 at 9:31 PM Ashutosh Bapat wrote: > > On Sun, Jan 19, 2025 at 6:45 PM Junwang Zhao wrote: > > > > Hi Ashutosh, > > > > On Wed, Jan 1, 2025 at 5:02 PM Ashutosh Bapat > > wrote: > > > > > > On Wed, Jan 1, 2025 at 2:22 PM Ashutosh Bapat > > > wrote: > > > > > > > > On Sat, Dec

Re: SQL Property Graph Queries (SQL/PGQ)

2025-01-19 Thread Junwang Zhao
Hi Ashutosh, On Wed, Jan 1, 2025 at 5:02 PM Ashutosh Bapat wrote: > > On Wed, Jan 1, 2025 at 2:22 PM Ashutosh Bapat > wrote: > > > > On Sat, Dec 21, 2024 at 6:21 PM Junwang Zhao wrote: > > Thanks Junwang for your review. > > > > > Here are some review opinions for 0001, I haven't seen the other

Re: SQL Property Graph Queries (SQL/PGQ)

2024-12-21 Thread Andreas Karlsson
On 10/29/24 8:55 PM, Andreas Karlsson wrote: I especially dislike the static variable in our patch. And as far as I understand it you can avoid the static by changing the lexer to use the push parser so it can emit multiple terminal tokens from one parsed token, but I have not looked into push

Re: SQL Property Graph Queries (SQL/PGQ)

2024-12-21 Thread Junwang Zhao
Hi Ashutosh, On Fri, Dec 6, 2024 at 12:34 AM Ashutosh Bapat wrote: > > Sorry, I forgot to attach patches. PFA the patches. > > On Thu, Dec 5, 2024 at 4:38 PM Ashutosh Bapat > wrote: > > > > On Fri, Nov 22, 2024 at 7:29 PM Ashutosh Bapat > > wrote: > > > > > > On Tue, Nov 19, 2024 at 10:08 PM Vi

Re: SQL Property Graph Queries (SQL/PGQ)

2024-12-16 Thread Junwang Zhao
On Mon, Dec 16, 2024 at 6:14 PM Ashutosh Bapat wrote: > > Hi Junwang, > > > > > I'm looking at the catalog definition, I have some questions which > > might be silly. > > Thanks for your interest in SQL/PGQ. > > > > > Each pg element can have multiple labels(whose properties belong > > to the same

Re: SQL Property Graph Queries (SQL/PGQ)

2024-12-16 Thread Ashutosh Bapat
Hi Junwang, > > I'm looking at the catalog definition, I have some questions which > might be silly. Thanks for your interest in SQL/PGQ. > > Each pg element can have multiple labels(whose properties belong > to the same pg element), can we have multiple elements share the > same label? Yes. A

Re: SQL Property Graph Queries (SQL/PGQ)

2024-12-14 Thread Junwang Zhao
Hi Ashutosh, On Fri, Dec 6, 2024 at 12:34 AM Ashutosh Bapat wrote: > > Sorry, I forgot to attach patches. PFA the patches. > > On Thu, Dec 5, 2024 at 4:38 PM Ashutosh Bapat > wrote: > > > > On Fri, Nov 22, 2024 at 7:29 PM Ashutosh Bapat > > wrote: > > > > > > On Tue, Nov 19, 2024 at 10:08 PM Vi

Re: SQL Property Graph Queries (SQL/PGQ)

2024-12-05 Thread Ashutosh Bapat
On Fri, Nov 22, 2024 at 7:29 PM Ashutosh Bapat wrote: > > On Tue, Nov 19, 2024 at 10:08 PM Vik Fearing wrote: > > > > > > On 05/11/2024 16:41, Ashutosh Bapat wrote: > > > > On Wed, Aug 28, 2024 at 3:48 PM Ashutosh Bapat > > wrote: > > > > Patches 0001 - 0006 are same as the previous set. > > 000

Re: SQL Property Graph Queries (SQL/PGQ)

2024-11-19 Thread Vik Fearing
On 05/11/2024 16:41, Ashutosh Bapat wrote: On Wed, Aug 28, 2024 at 3:48 PM Ashutosh Bapat 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

Re: SQL Property Graph Queries (SQL/PGQ)

2024-10-29 Thread Andreas Karlsson
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. Hi, I found a potential bug in the parsing of the left and right arrows. They can be broken up in - > and < - respec

Re: SQL Property Graph Queries (SQL/PGQ)

2024-08-20 Thread Ajay Pal
Hi All, When we use a graph table and any local table, the server crashes. Please note, It is happening when using the where clause for the local table only. postgres=# SELECT * FROM customers a, GRAPH_TABLE (myshop2 MATCH (c IS customers WHERE c.address = 'US')-[IS customer_orders]->(o IS orders

Re: SQL Property Graph Queries (SQL/PGQ)

2024-08-13 Thread Ajay Pal
Hello, Further testing found that using a property graph with the plpgsql function crashed the server. Please take a look at the attached SQL file for reference tables. postgres=# create or replace function func() returns int as postgres-# $$ postgres$# declare person_av varchar; postgres$# begin

Re: SQL Property Graph Queries (SQL/PGQ)

2024-08-13 Thread Ajay Pal
Hello, With the attached patch found below error when try to use "Any directed edge" syntax. postgres=# SELECT * FROM GRAPH_TABLE (students_graph postgres(# MATCH postgres(# (a IS person ) - [] - (b IS person) postgres(# COLUMNS (a.name AS person_a, b.name AS person_b) postgres(# ); ERROR:

Re: SQL Property Graph Queries (SQL/PGQ)

2024-08-05 Thread Ashutosh Bapat
Hi Imran, On Sun, Aug 4, 2024 at 12:32 PM Imran Zaheer wrote: > > Hi > I am attaching a new patch for a minor feature addition. > > - Adding support for 'Labels and properties: EXCEPT list' Do you intend to support EXCEPT in the label expression as well or just properties? > > Please let me kno

Re: SQL Property Graph Queries (SQL/PGQ)

2024-08-04 Thread Imran Zaheer
Hi I am attaching a new patch for a minor feature addition. - Adding support for 'Labels and properties: EXCEPT list' Please let me know if something is missing. Thanks and Regards Imran Zaheer On Mon, Jul 22, 2024 at 9:02 PM Ashutosh Bapat wrote: > > On Wed, Jul 17, 2024 at 11:04 AM Ashutosh

Re: SQL Property Graph Queries (SQL/PGQ)

2024-07-04 Thread Florents Tselai
In the ddl.sgml, I’d swap the first two paragraphs. I find the first one a bit confusing as-is. As far as I can tell, it’s an implementation detail. The first paragraph should answer, “I have some data modeled as a graph G=(V, E). Can Postgres help me?”. Then, introducing property graphs makes m

Re: SQL Property Graph Queries (SQL/PGQ)

2024-02-25 Thread Ashutosh Bapat
On Fri, Feb 23, 2024 at 11:08 PM Tomas Vondra wrote: > > On 2/23/24 17:15, Peter Eisentraut wrote: > > On 16.02.24 20:23, Andres Freund wrote: > >> One aspect that I m concerned with structurally is that the > >> transformation, > >> from property graph queries to something postgres understands, i

Re: SQL Property Graph Queries (SQL/PGQ)

2024-02-23 Thread Tomas Vondra
On 2/23/24 17:15, Peter Eisentraut wrote: > On 16.02.24 20:23, Andres Freund wrote: >> One aspect that I m concerned with structurally is that the >> transformation, >> from property graph queries to something postgres understands, is done >> via the >> rewrite system. I doubt that that is a good i

Re: SQL Property Graph Queries (SQL/PGQ)

2024-02-23 Thread Peter Eisentraut
On 16.02.24 20:23, Andres Freund wrote: One aspect that I m concerned with structurally is that the transformation, from property graph queries to something postgres understands, is done via the rewrite system. I doubt that that is a good idea. For one it bars the planner from making plans that b

Re: SQL Property Graph Queries (SQL/PGQ)

2024-02-16 Thread Andres Freund
Hi, On 2024-02-16 15:53:11 +0100, Peter Eisentraut wrote: > The patch is quite fragile, and treading outside the tested paths will > likely lead to grave misbehavior. Use with caution. But I feel that > the general structure is ok, and we just need to fill in the > proverbial few thousand lines