Hi,
Currently the query id for pg_stat_statements gets calculated based on the parse nodes specifics.
This means that the user cannot add a comment to a SQL query to test something. (though some other RDBMS allows this practice).
Consider this use case: for query q, admin looks at stats and performs some optimization (without changing the query). Admin adds / modifies the comment for q - now the query becomes q'. If query id doesn't change, there still would be one row in pg_stat_statements which makes it difficult to gauge the effectiveness of the tuning.
I want to get opinion from the community whether adding / changing comment in SQL query should result in new query id for pg_stat_statements.
Cheers