From: Arthur Zakirov Date: Thu, 2 Nov 2017 13:00:09 +0000 (+0300) Subject: Use pg_strcasecmp instead of strcasecmp for the sake of portability X-Git-Tag: REL96_1_2_3~5 X-Git-Url: http://git.osdn.net/view?p=pghintplan%2Fpg_hint_plan.git;a=commitdiff_plain;h=e40ba9a2c9e74b7ef295ecc89c6710203fd5d470 Use pg_strcasecmp instead of strcasecmp for the sake of portability --- diff --git a/pg_hint_plan.c b/pg_hint_plan.c index 3aa2604..b902a5c 100644 --- a/pg_hint_plan.c +++ b/pg_hint_plan.c @@ -1647,7 +1647,7 @@ parse_hints(HintState *hstate, Query *parse, const char *str) char *keyword = parser->keyword; Hint *hint; - if (strcasecmp(buf.data, keyword) != 0) + if (pg_strcasecmp(buf.data, keyword) != 0) continue; hint = parser->create_func(head, keyword, parser->hint_keyword); @@ -2471,9 +2471,9 @@ ParallelHintParse(ParallelHint *hint, HintState *hstate, Query *parse, if (length == 3) { const char *modeparam = (const char *)list_nth(name_list, 2); - if (strcasecmp(modeparam, "hard") == 0) + if (pg_strcasecmp(modeparam, "hard") == 0) force_parallel = true; - else if (strcasecmp(modeparam, "soft") != 0) + else if (pg_strcasecmp(modeparam, "soft") != 0) { hint_ereport(modeparam, ("enforcement must be soft or hard: %s",