=== Applying patches on top of PostgreSQL commit ID 8b3e2c622a85208b94808c54d9b40b10b030d304 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Nov 28 11:34:25 UTC 2025 On branch cf/6232 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-Fix-error-reporting-for-SQL-JSON-path-type-mismat.patch === Applying: Fix error reporting for SQL/JSON path type mismatches Using index info to reconstruct a base tree... M src/backend/parser/parse_expr.c M src/test/regress/expected/sqljson_queryfuncs.out M src/test/regress/sql/sqljson_queryfuncs.sql Falling back to patching base and 3-way merge... Auto-merging src/backend/parser/parse_expr.c CONFLICT (content): Merge conflict in src/backend/parser/parse_expr.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 Fix error reporting for SQL/JSON path type mismatches 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 src/backend/parser/parse_expr.c === using patch(1) to apply patch ./v2-0001-Fix-error-reporting-for-SQL-JSON-path-type-mismat.patch === patching file src/backend/parser/parse_expr.c Hunk #1 FAILED at 4285. Hunk #2 FAILED at 4500. 2 out of 2 hunks FAILED -- saving rejects to file src/backend/parser/parse_expr.c.rej patching file src/test/regress/expected/sqljson_queryfuncs.out Hunk #1 FAILED at 1331. Hunk #2 FAILED at 1355. 2 out of 2 hunks FAILED -- saving rejects to file src/test/regress/expected/sqljson_queryfuncs.out.rej patching file src/test/regress/sql/sqljson_queryfuncs.sql Hunk #1 FAILED at 450. Hunk #2 FAILED at 460. 2 out of 2 hunks FAILED -- saving rejects to file src/test/regress/sql/sqljson_queryfuncs.sql.rej Removing src/backend/parser/parse_expr.c.rej Removing src/test/regress/expected/sqljson_queryfuncs.out.rej Removing src/test/regress/sql/sqljson_queryfuncs.sql.rej === using 'git apply' to apply patch ./v2-0001-Fix-error-reporting-for-SQL-JSON-path-type-mismat.patch === Applied patch to 'src/backend/parser/parse_expr.c' with conflicts. Applied patch to 'src/test/regress/expected/sqljson_queryfuncs.out' cleanly. Applied patch to 'src/test/regress/sql/sqljson_queryfuncs.sql' cleanly. U src/backend/parser/parse_expr.c diff --cc src/backend/parser/parse_expr.c index 44fd1385f8c,87b93166163..00000000000 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@@ -4285,8 -4285,6 +4285,11 @@@ transformJsonFuncExpr(ParseState *pstat { JsonExpr *jsexpr; Node *path_spec; ++<<<<<<< ours + Oid pathspec_type; + int pathspec_loc; ++======= ++>>>>>>> theirs Node *coerced_path_spec; const char *func_name = NULL; JsonFormatType default_format; @@@ -4503,20 -4501,23 +4506,38 @@@ jsexpr->format = func->context_item->format; path_spec = transformExprRecurse(pstate, func->pathspec); ++<<<<<<< ours + pathspec_type = exprType(path_spec); + pathspec_loc = exprLocation(path_spec); + coerced_path_spec = coerce_to_target_type(pstate, path_spec, + pathspec_type, + JSONPATHOID, -1, + COERCION_EXPLICIT, + COERCE_IMPLICIT_CAST, + pathspec_loc); + if (coerced_path_spec == NULL) ++======= + coerced_path_spec = coerce_to_target_type(pstate, path_spec, + exprType(path_spec), + JSONPATHOID, -1, + COERCION_EXPLICIT, + COERCE_IMPLICIT_CAST, + exprLocation(path_spec)); + if (coerced_path_spec == NULL) + { + Oid pathspec_type = exprType(path_spec); + int pathspec_loc = exprLocation(path_spec); + ++>>>>>>> theirs ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("JSON path expression must be of type %s, not of type %s", "jsonpath", format_type_be(pathspec_type)), parser_errposition(pstate, pathspec_loc))); ++<<<<<<< ours ++======= + } ++>>>>>>> theirs jsexpr->path_spec = coerced_path_spec; /* Transform and coerce the PASSING arguments to jsonb. */