From: Tom Lane Date: Mon, 21 Apr 2014 17:28:07 +0000 (-0400) Subject: pg_stat_statements forgot to let previous occupant of hook get control too. X-Git-Tag: REL9_4_BETA1~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78a3c9b6a5f6cc84abaf4e13deb58c620eb2161b;p=postgresql pg_stat_statements forgot to let previous occupant of hook get control too. pgss_post_parse_analyze() neglected to pass the call on to any earlier occupant of the post_parse_analyze_hook. There are no other users of that hook in contrib/, and most likely none in the wild either, so this is probably just a latent bug. But it's a bug nonetheless, so back-patch to 9.2 where this code was introduced. --- diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 2ad3fb5886..de82ef5a1f 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -767,6 +767,9 @@ pgss_post_parse_analyze(ParseState *pstate, Query *query) { pgssJumbleState jstate; + if (prev_post_parse_analyze_hook) + prev_post_parse_analyze_hook(pstate, query); + /* Assert we didn't do this already */ Assert(query->queryId == 0);