From: Shigeru HANADA Date: Fri, 26 Oct 2012 08:39:22 +0000 (+0900) Subject: Move name constatnts near by enum. X-Git-Tag: REL91_1_1_1~215 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=02d8a0ad4a63e7c0ea960224d92eb1b7203eb87f;hp=709cffa7a3e97b360b75cfa9986ce9de56aaac55;p=pghintplan%2Fpg_hint_plan.git Move name constatnts near by enum. This would improve maintenancebility. --- diff --git a/pg_hint_plan.c b/pg_hint_plan.c index ebeb161..539882c 100644 --- a/pg_hint_plan.c +++ b/pg_hint_plan.c @@ -113,6 +113,13 @@ typedef enum HintType HINT_TYPE_SET } HintType; +static const char *HintTypeName[] = { + "scan method", + "join method", + "leading", + "set" +}; + /* hint status */ typedef enum HintStatus { @@ -1090,10 +1097,6 @@ parse_head_comment(Query *parse) if (HintCmp(hstate->all_hints + i, hstate->all_hints + i + 1) == 0) { - const char *HintTypeName[] = { - "scan method", "join method", "leading", "set" - }; - parse_ereport(hstate->all_hints[i]->hint_str, ("Conflict %s hint.", HintTypeName[hint->type])); hstate->all_hints[i]->state = HINT_STATE_DUPLICATION;