On 2024/07/22 15:23, kuroda.keis...@nttcom.co.jp wrote:
Hi Fujii-san, Thank you for your reply and comment! attach v2 fixed patch.
Thanks for updating the patch! +SELECT query, calls, rows FROM pg_stat_statements + WHERE queryid IS NULL ORDER BY query COLLATE "C"; Shouldn't we also include calls and rows in the ORDER BY clause? Without this, if there are multiple records with the same query but different calls or rows, the query result might be unstable. I believe this is causing the test failure reported by he PostgreSQL Patch Tester. http://cfbot.cputube.org/ https://cirrus-ci.com/task/4533613939654656
Yes. If we add "queryid <> 0" to the WHERE clause, we can get the same result. Change the SQL to the following: +SELECT query, calls, rows FROM pg_stat_statements + WHERE queryid <> 0 ORDER BY query COLLATE "C";
I was thinking of adding "queryid <> 0" in the SELECT clause instead of the WHERE clause. This way, we can verify if the query results are as expected regardless of the queryid value, including both queryid <> 0 and queryid = 0. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION