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 06:34:30 +0000 (15:34 +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 0200be8..124f4ef 100644 (file)
@@ -2592,8 +2592,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;
        }