=== Applying patches on top of PostgreSQL commit ID d374280e1837adc1f8218bb0d69ffbae5d808fc6 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Jul 17 18:03:30 UTC 2026 On branch cf/6771 nothing to commit, working tree clean === using 'git am' to apply patch ./v3-0001-Add-interrupt-checks-during-graph-path-query-gene.patch === Applying: Add interrupt checks during graph path query generation. === using 'git am' to apply patch ./v3-0002-Add-temporary-timing-logs-for-GRAPH_TABLE-path-ex.patch === Applying: Add temporary timing logs for GRAPH_TABLE path expansion. === using 'git am' to apply patch ./v3-0003-Prune-non-matching-graph-path-prefixes-during-DFS.patch === Applying: Prune non-matching graph path prefixes during DFS === using 'git am' to apply patch ./v3-0004-add-a-test-of-long-chain-pattern-that-survives-pr.patch === Applying: add a test of long chain pattern that survives pruning used to enumerate the full N^K product Using index info to reconstruct a base tree... M src/test/regress/expected/graph_table.out M src/test/regress/sql/graph_table.sql Falling back to patching base and 3-way merge... Auto-merging src/test/regress/sql/graph_table.sql CONFLICT (content): Merge conflict in src/test/regress/sql/graph_table.sql Auto-merging src/test/regress/expected/graph_table.out CONFLICT (content): Merge conflict in src/test/regress/expected/graph_table.out error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 add a test of long chain pattern that survives pruning used to enumerate the full N^K product When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./v3-0004-add-a-test-of-long-chain-pattern-that-survives-pr.patch === patching file src/test/regress/expected/graph_table.out Hunk #1 FAILED at 920. 1 out of 1 hunk FAILED -- saving rejects to file src/test/regress/expected/graph_table.out.rej patching file src/test/regress/sql/graph_table.sql Hunk #1 FAILED at 523. 1 out of 1 hunk FAILED -- saving rejects to file src/test/regress/sql/graph_table.sql.rej Removing src/test/regress/expected/graph_table.out.rej Removing src/test/regress/sql/graph_table.sql.rej === using 'git apply' to apply patch ./v3-0004-add-a-test-of-long-chain-pattern-that-survives-pr.patch === Applied patch to 'src/test/regress/expected/graph_table.out' with conflicts. Applied patch to 'src/test/regress/sql/graph_table.sql' with conflicts. U src/test/regress/expected/graph_table.out U src/test/regress/sql/graph_table.sql diff --cc src/test/regress/expected/graph_table.out index 46566b2e32f,768ada77841..00000000000 --- a/src/test/regress/expected/graph_table.out +++ b/src/test/regress/expected/graph_table.out @@@ -963,7 -920,94 +963,98 @@@ SELECT * FROM GRAPH_TABLE (g4 MATCH (s 30 | 300 | 10 (2 rows) ++<<<<<<< ours +-- GRAPH_TABLE in views ++======= + -- long chain MATCH with branching between layers (stress for graph-table prefix pruning + -- vs enumerating full cross products along the trail) + CREATE TABLE gv5_v1 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v2 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v3 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v4 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v5 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v6 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v7 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v8 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_e1 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e2 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e3 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e4 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e5 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e6 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e7 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e8 (id int PRIMARY KEY, src int, dest int); + INSERT INTO gv5_v1 VALUES (1, 100); + INSERT INTO gv5_v2 VALUES (1, 201), (2, 202); + INSERT INTO gv5_v3 VALUES (1, 301), (2, 302); + INSERT INTO gv5_v4 VALUES (1, 401), (2, 402); + INSERT INTO gv5_v5 VALUES (1, 501), (2, 502); + INSERT INTO gv5_v6 VALUES (6, 603); + INSERT INTO gv5_v7 VALUES (7, 704); + INSERT INTO gv5_v8 VALUES (8, 805); + INSERT INTO gv5_e1 VALUES (101, 1, 1), (102, 1, 2); + INSERT INTO gv5_e2 VALUES (201, 1, 1), (202, 1, 2), (203, 2, 1), (204, 2, 2); + INSERT INTO gv5_e3 VALUES (301, 1, 1), (302, 1, 2), (303, 2, 1), (304, 2, 2); + INSERT INTO gv5_e4 VALUES (401, 1, 1), (402, 1, 2), (403, 2, 1), (404, 2, 2); + INSERT INTO gv5_e5 VALUES (501, 1, 6); + INSERT INTO gv5_e6 VALUES (601, 6, 7); + INSERT INTO gv5_e7 VALUES (701, 7, 8); + INSERT INTO gv5_e8 VALUES (801, 8, 1); + CREATE PROPERTY GRAPH g5 + VERTEX TABLES ( + gv5_v1 LABEL vl PROPERTIES (id, val) LABEL vl2 PROPERTIES (id, val), + gv5_v2 LABEL vl PROPERTIES (id, val), + gv5_v3 LABEL vl PROPERTIES (id, val), + gv5_v4 LABEL vl PROPERTIES (id, val), + gv5_v5 LABEL vl PROPERTIES (id, val), + gv5_v6 LABEL vl PROPERTIES (id, val), + gv5_v7 LABEL vl PROPERTIES (id, val), + gv5_v8 LABEL vl PROPERTIES (id, val) + ) + EDGE TABLES ( + gv5_e1 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v1 (id) + DESTINATION KEY (dest) REFERENCES gv5_v2 (id) + LABEL el PROPERTIES (id), + gv5_e2 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v2 (id) + DESTINATION KEY (dest) REFERENCES gv5_v3 (id) + LABEL el PROPERTIES (id), + gv5_e3 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v3 (id) + DESTINATION KEY (dest) REFERENCES gv5_v4 (id) + LABEL el PROPERTIES (id), + gv5_e4 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v4 (id) + DESTINATION KEY (dest) REFERENCES gv5_v5 (id) + LABEL el PROPERTIES (id), + gv5_e5 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v5 (id) + DESTINATION KEY (dest) REFERENCES gv5_v6 (id) + LABEL el PROPERTIES (id), + gv5_e6 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v6 (id) + DESTINATION KEY (dest) REFERENCES gv5_v7 (id) + LABEL el PROPERTIES (id), + gv5_e7 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v7 (id) + DESTINATION KEY (dest) REFERENCES gv5_v8 (id) + LABEL el PROPERTIES (id), + gv5_e8 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v8 (id) + DESTINATION KEY (dest) REFERENCES gv5_v1 (id) + LABEL el PROPERTIES (id) + ); + -- 16 paths along v1->v5 (2^4) with gv5_v1.id = 1 + SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a IS vl2)-[e1]->(b)-[e2]->(c)-[e3]->(d)-[e4]->(e) + COLUMNS (a.id AS aid)); + count + ------- + 16 + (1 row) + + -- ruleutils reverse parsing ++>>>>>>> theirs -- The query in the view definition is intentionally complex to test one view with many -- features like label disjunction, lateral references, WHERE clauses in graph -- patterns. diff --cc src/test/regress/sql/graph_table.sql index 3fb0e50ddb2,18b7f74bc1c..00000000000 --- a/src/test/regress/sql/graph_table.sql +++ b/src/test/regress/sql/graph_table.sql @@@ -536,8 -523,90 +536,95 @@@ SELECT * FROM GRAPH_TABLE (g4 MATCH (s SELECT * FROM GRAPH_TABLE (g4 MATCH (s)-[e]-(d) WHERE s.id = 3 COLUMNS (s.val, e.val, d.val)) ORDER BY 1, 2, 3; SELECT * FROM GRAPH_TABLE (g4 MATCH (s WHERE s.id = 3)-[e]-(d) COLUMNS (s.val, e.val, d.val)) ORDER BY 1, 2, 3; ++<<<<<<< ours +-- GRAPH_TABLE in views + ++======= + -- long chain MATCH with branching between layers (stress for graph-table prefix pruning + -- vs enumerating full cross products along the trail) + CREATE TABLE gv5_v1 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v2 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v3 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v4 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v5 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v6 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v7 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_v8 (id int PRIMARY KEY, val int); + CREATE TABLE gv5_e1 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e2 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e3 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e4 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e5 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e6 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e7 (id int PRIMARY KEY, src int, dest int); + CREATE TABLE gv5_e8 (id int PRIMARY KEY, src int, dest int); + INSERT INTO gv5_v1 VALUES (1, 100); + INSERT INTO gv5_v2 VALUES (1, 201), (2, 202); + INSERT INTO gv5_v3 VALUES (1, 301), (2, 302); + INSERT INTO gv5_v4 VALUES (1, 401), (2, 402); + INSERT INTO gv5_v5 VALUES (1, 501), (2, 502); + INSERT INTO gv5_v6 VALUES (6, 603); + INSERT INTO gv5_v7 VALUES (7, 704); + INSERT INTO gv5_v8 VALUES (8, 805); + INSERT INTO gv5_e1 VALUES (101, 1, 1), (102, 1, 2); + INSERT INTO gv5_e2 VALUES (201, 1, 1), (202, 1, 2), (203, 2, 1), (204, 2, 2); + INSERT INTO gv5_e3 VALUES (301, 1, 1), (302, 1, 2), (303, 2, 1), (304, 2, 2); + INSERT INTO gv5_e4 VALUES (401, 1, 1), (402, 1, 2), (403, 2, 1), (404, 2, 2); + INSERT INTO gv5_e5 VALUES (501, 1, 6); + INSERT INTO gv5_e6 VALUES (601, 6, 7); + INSERT INTO gv5_e7 VALUES (701, 7, 8); + INSERT INTO gv5_e8 VALUES (801, 8, 1); + CREATE PROPERTY GRAPH g5 + VERTEX TABLES ( + gv5_v1 LABEL vl PROPERTIES (id, val) LABEL vl2 PROPERTIES (id, val), + gv5_v2 LABEL vl PROPERTIES (id, val), + gv5_v3 LABEL vl PROPERTIES (id, val), + gv5_v4 LABEL vl PROPERTIES (id, val), + gv5_v5 LABEL vl PROPERTIES (id, val), + gv5_v6 LABEL vl PROPERTIES (id, val), + gv5_v7 LABEL vl PROPERTIES (id, val), + gv5_v8 LABEL vl PROPERTIES (id, val) + ) + EDGE TABLES ( + gv5_e1 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v1 (id) + DESTINATION KEY (dest) REFERENCES gv5_v2 (id) + LABEL el PROPERTIES (id), + gv5_e2 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v2 (id) + DESTINATION KEY (dest) REFERENCES gv5_v3 (id) + LABEL el PROPERTIES (id), + gv5_e3 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v3 (id) + DESTINATION KEY (dest) REFERENCES gv5_v4 (id) + LABEL el PROPERTIES (id), + gv5_e4 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v4 (id) + DESTINATION KEY (dest) REFERENCES gv5_v5 (id) + LABEL el PROPERTIES (id), + gv5_e5 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v5 (id) + DESTINATION KEY (dest) REFERENCES gv5_v6 (id) + LABEL el PROPERTIES (id), + gv5_e6 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v6 (id) + DESTINATION KEY (dest) REFERENCES gv5_v7 (id) + LABEL el PROPERTIES (id), + gv5_e7 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v7 (id) + DESTINATION KEY (dest) REFERENCES gv5_v8 (id) + LABEL el PROPERTIES (id), + gv5_e8 KEY (id) + SOURCE KEY (src) REFERENCES gv5_v8 (id) + DESTINATION KEY (dest) REFERENCES gv5_v1 (id) + LABEL el PROPERTIES (id) + ); + -- 16 paths along v1->v5 (2^4) with gv5_v1.id = 1 + SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a IS vl2)-[e1]->(b)-[e2]->(c)-[e3]->(d)-[e4]->(e) + COLUMNS (a.id AS aid)); + + -- ruleutils reverse parsing ++>>>>>>> theirs -- The query in the view definition is intentionally complex to test one view with many -- features like label disjunction, lateral references, WHERE clauses in graph -- patterns.