OSDN Git Service

パース処理の流れを「パーツ読み取り」→「空白読み飛ばし」に統一。
authorShigeru Hanada <shigeru.hanada@gmail.com>
Wed, 18 Apr 2012 09:21:02 +0000 (18:21 +0900)
committerShigeru Hanada <shigeru.hanada@gmail.com>
Wed, 18 Apr 2012 09:21:02 +0000 (18:21 +0900)
pg_hint_plan.c

index b398018..b38316e 100644 (file)
@@ -1027,6 +1027,7 @@ ParseScanMethod(PlanHint *plan, Query *parse, char *keyword, const char *str)
                ScanHintDelete(hint);
                return NULL;
        }
+       skip_space(str);
 
        /*
         * インデックスリストを受け付けるヒントであれば、インデックス参照をパース
@@ -1038,7 +1039,6 @@ ParseScanMethod(PlanHint *plan, Query *parse, char *keyword, const char *str)
 #endif
                strcmp(keyword, HINT_BITMAPSCAN) == 0)
        {
-               skip_space(str);
                while (*str != ')' && *str != '\0')
                {
                        char       *indexname;
@@ -1056,7 +1056,7 @@ ParseScanMethod(PlanHint *plan, Query *parse, char *keyword, const char *str)
        }
 
        /* カッコが閉じていなければヒント無効。 */
-       skip_space(str);
+       skip_space(str);                /* just in case */
        if (*str != ')')
        {
                parse_ereport(str, ("Closed parenthesis is necessary."));