From 6a88a058614bc921d6cab1cc50330ddee283c810 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 1 Mar 2023 10:31:55 +0900 Subject: [PATCH] doc: Update pg_stat_statements about query ID calculation of utilities Since 3db72eb, the calculation of the query ID hash for utilities is not done based on the textual query strings, but on their internal Query representation, meaning that there can be an overlap when they use literal constants. The documentation of pg_stat_statements was missing a refresh about that. Extracted from a larger patch by me. Discussion: https://postgr.es/m/Y+MRdEq9W9XVa2AB@paquier.xyz --- doc/src/sgml/pgstatstatements.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index efc36da602..0b40e1eea3 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -487,13 +487,13 @@ Plannable queries (that is, SELECT, INSERT, - UPDATE, DELETE, and MERGE) are combined into a single + UPDATE, DELETE, and MERGE) + and utility commands are combined into a single pg_stat_statements entry whenever they have identical query structures according to an internal hash calculation. Typically, two queries will be considered the same for this purpose if they are semantically equivalent except for the values of literal constants - appearing in the query. Utility commands (that is, all other commands) - are compared strictly on the basis of their textual query strings, however. + appearing in the query. -- 2.39.5