From 4746ddb1566a80db2038a6ac55c5dae4c43bb45e Mon Sep 17 00:00:00 2001 From: Arthur Zakirov Date: Thu, 2 Nov 2017 16:00:09 +0300 Subject: [PATCH] Use pg_strcasecmp instead of strcasecmp for the sake of portability Back patched to branches PG93-96 and PG10. --- pg_hint_plan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pg_hint_plan.c b/pg_hint_plan.c index 3469500..7069e3c 100644 --- a/pg_hint_plan.c +++ b/pg_hint_plan.c @@ -1655,7 +1655,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); @@ -2468,9 +2468,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", -- 2.11.0