OSDN Git Service

Catch up the changes of pg_stat_statements.c
[pghintplan/pg_hint_plan.git] / pg_stat_statements.c
index 5f869c2..7304565 100644 (file)
@@ -82,7 +82,6 @@
 #include "utils/builtins.h"
 #include "utils/memutils.h"
 
-
 PG_MODULE_MAGIC;
 
 /* Location of permanent stats file (valid when database is shut down) */
@@ -965,10 +964,13 @@ pgss_ProcessUtility(Node *parsetree, const char *queryString,
         * calculated from the query tree) would be used to accumulate costs of
         * ensuing EXECUTEs.  This would be confusing, and inconsistent with other
         * cases where planning time is not included at all.
+        *
+        * Likewise, we don't track execution of DEALLOCATE.
         */
        if (pgss_track_utility && pgss_enabled() &&
                !IsA(parsetree, ExecuteStmt) &&
-               !IsA(parsetree, PrepareStmt))
+               !IsA(parsetree, PrepareStmt) &&
+               !IsA(parsetree, DeallocateStmt))
        {
                instr_time      start;
                instr_time      duration;
@@ -2407,6 +2409,7 @@ JumbleExpr(pgssJumbleState *jstate, Node *node)
                                SubLink    *sublink = (SubLink *) node;
 
                                APP_JUMB(sublink->subLinkType);
+                               APP_JUMB(sublink->subLinkId);
                                JumbleExpr(jstate, (Node *) sublink->testexpr);
                                JumbleQuery(jstate, (Query *) sublink->subselect);
                        }