=== Applying patches on top of PostgreSQL commit ID 355814931141537e51418a276c74e91283da9631 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Aug 1 16:47:30 UTC 2026 On branch cf/7086 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-Avoid-empty-generated-names-for-expression-index-.patch === Applying: Avoid empty generated names for expression index columns Using index info to reconstruct a base tree... M src/backend/commands/indexcmds.c M src/test/regress/expected/create_index.out M src/test/regress/sql/create_index.sql Falling back to patching base and 3-way merge... Auto-merging src/test/regress/sql/create_index.sql Auto-merging src/test/regress/expected/create_index.out Auto-merging src/backend/commands/indexcmds.c CONFLICT (content): Merge conflict in src/backend/commands/indexcmds.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Avoid empty generated names for expression index columns 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 ./v2-0001-Avoid-empty-generated-names-for-expression-index-.patch === patching file src/backend/commands/indexcmds.c Hunk #1 FAILED at 2874. Hunk #2 FAILED at 2891. 2 out of 2 hunks FAILED -- saving rejects to file src/backend/commands/indexcmds.c.rej patching file src/test/regress/expected/create_index.out Hunk #1 succeeded at 1658 (offset 10 lines). patching file src/test/regress/sql/create_index.sql Hunk #1 succeeded at 653 (offset 4 lines). Unstaged changes after reset: M src/test/regress/expected/create_index.out M src/test/regress/sql/create_index.sql Removing src/backend/commands/indexcmds.c.rej === using 'git apply' to apply patch ./v2-0001-Avoid-empty-generated-names-for-expression-index-.patch === Applied patch to 'src/backend/commands/indexcmds.c' with conflicts. Applied patch to 'src/test/regress/expected/create_index.out' cleanly. Applied patch to 'src/test/regress/sql/create_index.sql' cleanly. U src/backend/commands/indexcmds.c diff --cc src/backend/commands/indexcmds.c index 3790b8e1252,0cd3b58e071..00000000000 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@@ -2894,29 -2894,30 +2894,51 @@@ ChooseIndexExpressionName_walker(Node * { Var *var = (Var *) node; TupleDesc tupdesc = RelationGetDescr(context->rel); ++<<<<<<< ours + const char *varname; ++======= + const char *name; ++>>>>>>> theirs /* Paranoia: ignore the Var if it looks fishy */ if (var->varno != 1 || var->varlevelsup != 0 || var->varattno < 0 || var->varattno > tupdesc->natts) return false; ++<<<<<<< ours + if (var->varattno > 0) ++======= + + if (var->varattno == 0) + { + /* Whole-row reference: use the relation's name */ + name = RelationGetRelationName(context->rel); + } + else ++>>>>>>> theirs { Form_pg_attribute att = TupleDescAttr(tupdesc, var->varattno - 1); if (att->attisdropped) return false; /* even more paranoia; shouldn't happen */ ++<<<<<<< ours + varname = NameStr(att->attname); + } + else + { + /* Whole-row Var: use the table's name */ + varname = RelationGetRelationName(context->rel); ++======= + name = NameStr(att->attname); ++>>>>>>> theirs } if (context->buf->len > 0) appendStringInfoChar(context->buf, '_'); ++<<<<<<< ours + appendStringInfoString(context->buf, varname); ++======= + appendStringInfoString(context->buf, name); ++>>>>>>> theirs /* Done if we've already reached NAMEDATALEN */ return (context->buf->len >= NAMEDATALEN);