Skip to content

Commit 98d62c2

Browse files
committed
Update comment.
generate_normalized_query() no longer needs to truncate text, but this one comment didn't get the memo. Per Peter Geoghegan.
1 parent c871e8f commit 98d62c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2726,14 +2726,15 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query,
27262726
if (tok_len < 0)
27272727
continue; /* ignore any duplicates */
27282728

2729-
/* Copy next chunk, or as much as will fit */
2729+
/* Copy next chunk (what precedes the next constant) */
27302730
len_to_wrt = off - last_off;
27312731
len_to_wrt -= last_tok_len;
27322732

27332733
Assert(len_to_wrt >= 0);
27342734
memcpy(norm_query + n_quer_loc, query + quer_loc, len_to_wrt);
27352735
n_quer_loc += len_to_wrt;
27362736

2737+
/* And insert a '?' in place of the constant token */
27372738
norm_query[n_quer_loc++] = '?';
27382739

27392740
quer_loc = off + tok_len;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy