OSDN Git Service

Call standrad_ProcessUtility when no hook is set
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Wed, 9 Jan 2019 00:35:41 +0000 (09:35 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Wed, 9 Jan 2019 00:58:21 +0000 (09:58 +0900)
The last commit 3cb8d0b forgot the case of no previous hook function
in the ProcessUtility hook function. Fix it.

pg_hint_plan.c

index a50e297..0d6325c 100644 (file)
@@ -2976,6 +2976,9 @@ pg_hint_plan_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
        if (prev_ProcessUtility_hook)
                prev_ProcessUtility_hook(pstmt, queryString, context, params, queryEnv,
                                                                 dest, completionTag);
+       else
+               standard_ProcessUtility(pstmt, queryString, context, params, queryEnv,
+                                                                dest, completionTag);
 
        if (plpgsql_recurse_level == 0)
                current_hint_retrieved = false;