OSDN Git Service

Fix behavior for pg_hint_plan.debug_print
[pghintplan/pg_hint_plan.git] / pg_hint_plan.c
index 5a044b8..7cdfbe8 100644 (file)
@@ -2921,7 +2921,7 @@ get_current_hint_string(Query *query, const char *query_str,
 
        if (debug_level > 1)
        {
-               if (debug_level == 1 && query_str && debug_query_string &&
+               if (debug_level == 2 && query_str && debug_query_string &&
                        strcmp(query_str, debug_query_string))
                        ereport(pg_hint_plan_debug_message_level,
                                        (errmsg("hints in comment=\"%s\"",
@@ -3570,7 +3570,7 @@ restrict_indexes(PlannerInfo *root, ScanMethodHint *hint, RelOptInfo *rel,
                pfree(indexname);
        }
 
-       if (debug_level == 1)
+       if (debug_level > 0)
        {
                StringInfoData  rel_buf;
                char *disprelname = "";