=== Applying patches on top of PostgreSQL commit ID b70cafd85fb5040d49a4e026fa9798d4ed5de17b === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sun Nov 2 18:54:21 UTC 2025 On branch cf/6199 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Fix-LTREE-subpath-with-negative-offset.patch === Applying: Fix LTREE subpath with negative offset Using index info to reconstruct a base tree... M contrib/ltree/expected/ltree.out M contrib/ltree/ltree_op.c M contrib/ltree/sql/ltree.sql Falling back to patching base and 3-way merge... Auto-merging contrib/ltree/sql/ltree.sql CONFLICT (content): Merge conflict in contrib/ltree/sql/ltree.sql Auto-merging contrib/ltree/ltree_op.c CONFLICT (content): Merge conflict in contrib/ltree/ltree_op.c Auto-merging contrib/ltree/expected/ltree.out CONFLICT (content): Merge conflict in contrib/ltree/expected/ltree.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 Fix LTREE subpath with negative offset 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". Unstaged changes after reset: M contrib/ltree/expected/ltree.out M contrib/ltree/ltree_op.c M contrib/ltree/sql/ltree.sql === using patch(1) to apply patch ./0001-Fix-LTREE-subpath-with-negative-offset.patch === patching file contrib/ltree/expected/ltree.out Hunk #1 FAILED at 128. 1 out of 1 hunk FAILED -- saving rejects to file contrib/ltree/expected/ltree.out.rej patching file contrib/ltree/ltree_op.c Hunk #1 FAILED at 323. 1 out of 1 hunk FAILED -- saving rejects to file contrib/ltree/ltree_op.c.rej patching file contrib/ltree/sql/ltree.sql Hunk #1 FAILED at 34. 1 out of 1 hunk FAILED -- saving rejects to file contrib/ltree/sql/ltree.sql.rej Removing contrib/ltree/expected/ltree.out.rej Removing contrib/ltree/ltree_op.c.rej Removing contrib/ltree/sql/ltree.sql.rej === using 'git apply' to apply patch ./0001-Fix-LTREE-subpath-with-negative-offset.patch === Applied patch to 'contrib/ltree/expected/ltree.out' with conflicts. Applied patch to 'contrib/ltree/ltree_op.c' with conflicts. Applied patch to 'contrib/ltree/sql/ltree.sql' with conflicts. U contrib/ltree/expected/ltree.out U contrib/ltree/ltree_op.c U contrib/ltree/sql/ltree.sql diff --cc contrib/ltree/expected/ltree.out index d2a56628475,aa53b970c6b..00000000000 --- a/contrib/ltree/expected/ltree.out +++ b/contrib/ltree/expected/ltree.out @@@ -128,7 -128,7 +128,11 @@@ SELECT subpath('Top.Child1.Child2',1) Child1.Child2 (1 row) ++<<<<<<< ours +SELECT subpath('Top.Child1.Child2',-4); -- error ++======= + SELECT subpath('Top.Child1.Child2',-4); ++>>>>>>> theirs ERROR: invalid positions SELECT index('1.2.3.4.5.6','1.2'); index diff --cc contrib/ltree/ltree_op.c index e3a84db37ff,167662b4749..00000000000 --- a/contrib/ltree/ltree_op.c +++ b/contrib/ltree/ltree_op.c @@@ -316,8 -316,13 +316,18 @@@ subpath(PG_FUNCTION_ARGS int32 end; ltree *res; ++<<<<<<< ours + if (start < 0) + start = t->numlevel + start; ++======= + end = start + len; + + if (start < 0) + { + start = t->numlevel + start; + end = start + len; + } ++>>>>>>> theirs if (len < 0) end = t->numlevel + len; diff --cc contrib/ltree/sql/ltree.sql index 77e6958c62a,108cfecad6f..00000000000 --- a/contrib/ltree/sql/ltree.sql +++ b/contrib/ltree/sql/ltree.sql @@@ -34,7 -34,7 +34,11 @@@ SELECT subpath('Top.Child1.Child2',0,0) SELECT subpath('Top.Child1.Child2',1,0); SELECT subpath('Top.Child1.Child2',0); SELECT subpath('Top.Child1.Child2',1); ++<<<<<<< ours +SELECT subpath('Top.Child1.Child2',-4); -- error ++======= + SELECT subpath('Top.Child1.Child2',-4); ++>>>>>>> theirs SELECT index('1.2.3.4.5.6','1.2');