diff options
author | Tom Lane | 2014-01-28 17:34:29 +0000 |
---|---|---|
committer | Tom Lane | 2014-01-28 17:34:29 +0000 |
commit | 98d62c28fd774ad8d123b66131dcdaa0b9c9d6d4 (patch) | |
tree | 927a7a1376c25512cad360a6d5d47907bd4adcf3 | |
parent | c871e8f53bd6dc9249b6d79f2fde34dedb200824 (diff) |
Update comment.
generate_normalized_query() no longer needs to truncate text, but this
one comment didn't get the memo. Per Peter Geoghegan.
-rw-r--r-- | contrib/pg_stat_statements/pg_stat_statements.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index aa6ae375773..3c6e84d0c40 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -2726,7 +2726,7 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query, if (tok_len < 0) continue; /* ignore any duplicates */ - /* Copy next chunk, or as much as will fit */ + /* Copy next chunk (what precedes the next constant) */ len_to_wrt = off - last_off; len_to_wrt -= last_tok_len; @@ -2734,6 +2734,7 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query, memcpy(norm_query + n_quer_loc, query + quer_loc, len_to_wrt); n_quer_loc += len_to_wrt; + /* And insert a '?' in place of the constant token */ norm_query[n_quer_loc++] = '?'; quer_loc = off + tok_len; |