Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98d62c2

Browse files
committed
Update comment.
generate_normalized_query() no longer needs to truncate text, but thisone comment didn't get the memo. Per Peter Geoghegan.
1 parentc871e8f commit98d62c2

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)

[8]ページ先頭

©2009-2025 Movatter.jp