OSDN Git Service

Fix debug level check in restrict_indexes
authorKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 19 Jan 2022 05:56:23 +0000 (14:56 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Wed, 19 Jan 2022 05:56:23 +0000 (14:56 +0900)
The debug logging code blocks in the function are inconsistent about
debug level.  Fix the conditions so that they work for the same debug
levels.

pg_hint_plan.c

index 048e85b..6002112 100644 (file)
@@ -3645,7 +3645,7 @@ restrict_indexes(PlannerInfo *root, ScanMethodHint *hint, RelOptInfo *rel,
                pfree(indexname);
        }
 
-       if (debug_level == 1)
+       if (debug_level > 0)
        {
                StringInfoData  rel_buf;
                char *disprelname = "";