OSDN Git Service

関数呼び出しをif文の条件部から外し、処理内容をわかりやすくした。
authorTakashi Suzuki <suzuki.takashi@metrosystems.co.jp>
Wed, 10 Oct 2012 06:22:49 +0000 (15:22 +0900)
committerTakashi Suzuki <suzuki.takashi@metrosystems.co.jp>
Wed, 10 Oct 2012 06:22:49 +0000 (15:22 +0900)
pg_hint_plan.c

index cdcb4f0..142c10c 100644 (file)
@@ -1514,13 +1514,16 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
        PlannedStmt        *result;
        PlanHint           *plan;
 
+       /* 有効なヒントを保存する。 */
+       plan = parse_head_comment(parse);
+
        /*
         * hintが指定されない、または空のhintを指定された場合は通常のparser処理をお
         * こなう。
         * 他のフック関数で実行されるhint処理をスキップするために、global 変数をNULL
         * に設定しておく。
         */
-       if (!pg_hint_plan_enable || (plan = parse_head_comment(parse)) == NULL)
+       if (!pg_hint_plan_enable || plan == NULL)
        {
                global = NULL;