OSDN Git Service

Fix the method to write query number in debug print.
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 22 Dec 2014 11:14:40 +0000 (20:14 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 22 Dec 2014 11:51:09 +0000 (20:51 +0900)
Query numbers in debug output should be written using qnostr, not qno.

pg_hint_plan.c

index 7fc481e..5a8d24a 100644 (file)
@@ -1134,12 +1134,12 @@ HintStateDump2(HintState *hstate)
        if (!hstate)
        {
                elog(pg_hint_plan_message_level,
-                        "pg_hint_plan[qno=0x%x]: HintStateDump:\nno hint", qno);
+                        "pg_hint_plan%s: HintStateDump:\nno hint", qnostr);
                return;
        }
 
        initStringInfo(&buf);
-       appendStringInfo(&buf, "pg_hint_plan[qno=0x%x]: HintStateDump: ", qno);
+       appendStringInfo(&buf, "pg_hint_plan%s: HintStateDump: ", qnostr);
        desc_hint_in_state(hstate, &buf, "{used hints", HINT_STATE_USED, true);
        desc_hint_in_state(hstate, &buf, "}, {not used hints", HINT_STATE_NOTUSED, true);
        desc_hint_in_state(hstate, &buf, "}, {duplicate hints", HINT_STATE_DUPLICATION, true);