=== Applying patches on top of PostgreSQL commit ID e18b0cb7344cb4bd28468f6c0aeeb9b9241d30aa === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Wed Jun 10 18:42:23 UTC 2026 On branch cf/6326 nothing to commit, working tree clean === using 'git am' to apply patch ./v9-0001-Make-JumbleState-const-in-post_parse_analyze-hook.patch === Applying: Make JumbleState const in post_parse_analyze hook Using index info to reconstruct a base tree... M contrib/pg_stat_statements/pg_stat_statements.c M src/backend/nodes/queryjumblefuncs.c M src/include/nodes/queryjumble.h M src/include/parser/analyze.h Falling back to patching base and 3-way merge... Auto-merging src/include/parser/analyze.h Auto-merging src/backend/nodes/queryjumblefuncs.c CONFLICT (content): Merge conflict in src/backend/nodes/queryjumblefuncs.c Auto-merging contrib/pg_stat_statements/pg_stat_statements.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 Make JumbleState const in post_parse_analyze hook 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 ./v9-0001-Make-JumbleState-const-in-post_parse_analyze-hook.patch === patching file contrib/pg_stat_statements/pg_stat_statements.c Hunk #1 FAILED at 50. Hunk #2 FAILED at 59. Hunk #3 FAILED at 335. Hunk #4 FAILED at 359. Hunk #5 FAILED at 378. Hunk #6 FAILED at 841. Hunk #7 FAILED at 1298. Hunk #8 FAILED at 2849. Hunk #9 FAILED at 2861. Hunk #10 FAILED at 2892. Hunk #11 FAILED at 2919. Hunk #12 succeeded at 2895 with fuzz 2 (offset -33 lines). Hunk #13 FAILED at 2948. 12 out of 13 hunks FAILED -- saving rejects to file contrib/pg_stat_statements/pg_stat_statements.c.rej patching file src/backend/nodes/queryjumblefuncs.c Hunk #1 FAILED at 40. Hunk #2 succeeded at 928 with fuzz 2 (offset 155 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/nodes/queryjumblefuncs.c.rej patching file src/include/nodes/queryjumble.h Hunk #1 FAILED at 91. 1 out of 1 hunk FAILED -- saving rejects to file src/include/nodes/queryjumble.h.rej patching file src/include/parser/analyze.h Hunk #1 FAILED at 21. 1 out of 1 hunk FAILED -- saving rejects to file src/include/parser/analyze.h.rej Unstaged changes after reset: M contrib/pg_stat_statements/pg_stat_statements.c M src/backend/nodes/queryjumblefuncs.c Removing contrib/pg_stat_statements/pg_stat_statements.c.rej Removing src/backend/nodes/queryjumblefuncs.c.rej Removing src/include/nodes/queryjumble.h.rej Removing src/include/parser/analyze.h.rej === using 'git apply' to apply patch ./v9-0001-Make-JumbleState-const-in-post_parse_analyze-hook.patch === Applied patch to 'contrib/pg_stat_statements/pg_stat_statements.c' cleanly. Applied patch to 'src/backend/nodes/queryjumblefuncs.c' with conflicts. Applied patch to 'src/include/nodes/queryjumble.h' cleanly. Applied patch to 'src/include/parser/analyze.h' cleanly. U src/backend/nodes/queryjumblefuncs.c diff --cc src/backend/nodes/queryjumblefuncs.c index 7c63766a51c,ecfbd5bd035..00000000000 --- a/src/backend/nodes/queryjumblefuncs.c +++ b/src/backend/nodes/queryjumblefuncs.c @@@ -791,32 -791,24 +791,47 @@@ CompLocation(const void *a, const void /* * Given a valid SQL string and an array of constant-location records, return * the textual lengths of those constants in a newly allocated LocationLen ++<<<<<<< ours + * array, or NULL if there are no constants. ++======= + * array, or NULL if there are no constants. It is the caller's responsibility + * to pfree the result, if necessary. ++>>>>>>> theirs * * The constants may use any allowed constant syntax, such as float literals, * bit-strings, single-quoted strings and dollar-quoted strings. This is * accomplished by using the public API for the core scanner. * ++<<<<<<< ours + * It is the caller's job to ensure that the string is a valid SQL statement + * with constants at the indicated locations. Since in practice the string + * has already been parsed, and the locations that the caller provides will + * have originated from within the authoritative parser, this should not be + * a problem. + * ++======= ++>>>>>>> theirs * Multiple constants can have the same location. We reset lengths of those * past the first to -1 so that they can later be ignored. * * If query_loc > 0, then "query" has been advanced by that much compared to * the original string start, as is the case with multi-statement strings, so * we need to translate the provided locations to compensate. (This lets us ++<<<<<<< ours + * avoid re-scanning statements before the one of interest, so it's worth + * doing.) ++======= + * avoid re-scanning statements before the one of interest, so it's worth doing.) ++>>>>>>> theirs * * N.B. There is an assumption that a '-' character at a Const location begins * a negative numeric constant. This precludes there ever being another * reason for a constant to start with a '-'. ++<<<<<<< ours + * + * It is the caller's responsibility to free the result, if necessary. ++======= ++>>>>>>> theirs */ LocationLen * ComputeConstantLengths(const JumbleState *jstate, const char *query, @@@ -867,7 -859,7 +882,11 @@@ /* * Adjust the constant's location using the provided starting location ++<<<<<<< ours + * of the current statement. This allows us to avoid scanning a ++======= + * of the current statement. This allows us to avoid scanning a ++>>>>>>> theirs * multi-statement string from the beginning. */ loc = locs[i].location - query_loc; @@@ -903,7 -895,8 +922,12 @@@ * gram.y). It is also useful for our purposes to start * from the minus symbol. In this way, queries like * "select * from foo where bar = 1" and "select * from ++<<<<<<< ours + * foo where bar = -2" can be treated similarly. ++======= + * foo where bar = -2" will have identical normalized + * query strings. ++>>>>>>> theirs */ tok = core_yylex(&yylval, &yylloc, yyscanner); if (tok == 0)