OSDN Git Service

Fix bogus error handling
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 13 Nov 2018 00:27:48 +0000 (09:27 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 13 Nov 2018 07:23:45 +0000 (16:23 +0900)
For somewhat reason set_config_int32_options does bogus error
handling. Howerver that error cannot be happen, fixed it.

pg_hint_plan.c

index 8b45846..3736e10 100644 (file)
@@ -2595,8 +2595,7 @@ set_config_int32_option(const char *name, int32 value, GucContext context)
        if (snprintf(buf, 16, "%d", value) < 0)
        {
                ereport(pg_hint_plan_message_level,
-                               (errmsg ("Cannot set integer value: %d: %s",
-                                                max_hint_nworkers, strerror(errno))));
+                               (errmsg ("Failed to convert integer to string: %d", value)));
                return false;
        }