OSDN Git Service

Fix bug: DETAILメッセージをPostgreSQLコーディング規約に合わせた。
authorMitsuru Hasegawa <hasegawa@metrosystems.co.jp>
Fri, 3 Aug 2012 11:01:23 +0000 (20:01 +0900)
committerMitsuru Hasegawa <hasegawa@metrosystems.co.jp>
Fri, 3 Aug 2012 11:01:23 +0000 (20:01 +0900)
引数で受け取った文字列の先頭文字を大文字に変換してからメッセージ
出力するようにした。

expected/pg_hint_plan.out
pg_hint_plan.c

index 2428270..78ba0e9 100644 (file)
@@ -623,7 +623,7 @@ error hint:
 /*+Leading( */
 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
 INFO:  hint syntax error at or near ""
-DETAIL:  relation name is necessary.
+DETAIL:  Relation name is necessary.
                     QUERY PLAN                    
 --------------------------------------------------
  Merge Join
index 4c7a664..a8196b3 100644 (file)
@@ -907,8 +907,15 @@ parse_quote_value(const char *str, char **word, char *value_type)
 
        if (buf.len == 0)
        {
+               char   *type;
+
+               type = pstrdup(value_type);
+               type[0] = toupper(type[0]);
+               parse_ereport(str, ("%s is necessary.", type));
+
                pfree(buf.data);
-               parse_ereport(str, ("%s is necessary.", value_type));
+               pfree(type);
+
                return NULL;
        }