• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

リビジョン0a400e6544949166f785576c14f3e629b732899a (tree)
日時2014-12-16 16:58:38
作者Kyotaro Horiguchi <horiguchi.kyotaro@lab....>
コミッターKyotaro Horiguchi

ログメッセージ

Enhance debug output.

Added new debug output levels detailed and verbose. These let you see
more verbose information about what pg_hint_plan does internally.

変更サマリ

差分

--- a/expected/pg_hint_plan.out
+++ b/expected/pg_hint_plan.out
@@ -42,7 +42,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
4242
4343 /*+ Test (t1 t2) */
4444 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
45-INFO: hint syntax error at or near "Test (t1 t2) "
45+INFO: pg_hint_plan: hint syntax error at or near "Test (t1 t2) "
4646 DETAIL: Unrecognized hint keyword "Test".
4747 QUERY PLAN
4848 --------------------------------------
@@ -86,7 +86,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
8686
8787 /*+Set(enable_indexscan off) /* nest comment */ */
8888 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
89-INFO: hint syntax error at or near "/* nest comment */ */
89+INFO: pg_hint_plan: hint syntax error at or near "/* nest comment */ */
9090 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;"
9191 DETAIL: Nested block comments are not supported.
9292 QUERY PLAN
@@ -259,7 +259,7 @@ error hint:
259259
260260 /*+Set(work_mem TO "1MB")*/
261261 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
262-INFO: hint syntax error at or near "Set(work_mem TO "1MB")"
262+INFO: pg_hint_plan: hint syntax error at or near "Set(work_mem TO "1MB")"
263263 DETAIL: Set hint requires name and value of GUC parameter.
264264 LOG: pg_hint_plan:
265265 used hint:
@@ -278,7 +278,7 @@ Set(work_mem TO 1MB)
278278
279279 /*+SeqScan(t1 t2)*/
280280 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
281-INFO: hint syntax error at or near ""
281+INFO: pg_hint_plan: hint syntax error at or near ""
282282 DETAIL: SeqScan hint accepts only one relation.
283283 LOG: pg_hint_plan:
284284 used hint:
@@ -655,7 +655,7 @@ error hint:
655655
656656 /*+Leading( */
657657 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
658-INFO: hint syntax error at or near ""
658+INFO: pg_hint_plan: hint syntax error at or near ""
659659 DETAIL: Closing parenthesis is necessary.
660660 QUERY PLAN
661661 --------------------------------------------------
@@ -675,7 +675,7 @@ DETAIL: Closing parenthesis is necessary.
675675
676676 /*+Leading( )*/
677677 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
678-INFO: hint syntax error at or near "Leading( )"
678+INFO: pg_hint_plan: hint syntax error at or near "Leading( )"
679679 DETAIL: Leading hint requires at least two relations.
680680 LOG: pg_hint_plan:
681681 used hint:
@@ -702,7 +702,7 @@ Leading()
702702
703703 /*+Leading( t3 )*/
704704 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
705-INFO: hint syntax error at or near "Leading( t3 )"
705+INFO: pg_hint_plan: hint syntax error at or near "Leading( t3 )"
706706 DETAIL: Leading hint requires at least two relations.
707707 LOG: pg_hint_plan:
708708 used hint:
@@ -804,7 +804,7 @@ error hint:
804804
805805 /*+Leading(t3 t4 t1 t2 t1)*/
806806 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
807-INFO: hint syntax error at or near "Leading(t3 t4 t1 t2 t1)"
807+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t4 t1 t2 t1)"
808808 DETAIL: Relation name "t1" is duplicated.
809809 LOG: pg_hint_plan:
810810 used hint:
@@ -831,7 +831,7 @@ Leading(t3 t4 t1 t2 t1)
831831
832832 /*+Leading(t3 t4 t4)*/
833833 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
834-INFO: hint syntax error at or near "Leading(t3 t4 t4)"
834+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t4 t4)"
835835 DETAIL: Relation name "t4" is duplicated.
836836 LOG: pg_hint_plan:
837837 used hint:
@@ -4334,25 +4334,25 @@ error hint:
43344334 -- duplicate hint test
43354335 /*+SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)*/
43364336 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
4337-INFO: hint syntax error at or near "SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4337+INFO: pg_hint_plan: hint syntax error at or near "SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43384338 DETAIL: Conflict scan method hint.
4339-INFO: hint syntax error at or near "IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4339+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43404340 DETAIL: Conflict scan method hint.
4341-INFO: hint syntax error at or near "BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4341+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43424342 DETAIL: Conflict scan method hint.
4343-INFO: hint syntax error at or near "SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4343+INFO: pg_hint_plan: hint syntax error at or near "SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43444344 DETAIL: Conflict scan method hint.
4345-INFO: hint syntax error at or near "IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4345+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43464346 DETAIL: Conflict scan method hint.
4347-INFO: hint syntax error at or near "BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4347+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43484348 DETAIL: Conflict scan method hint.
4349-INFO: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4349+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43504350 DETAIL: Conflict join method hint.
4351-INFO: hint syntax error at or near "NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4351+INFO: pg_hint_plan: hint syntax error at or near "NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43524352 DETAIL: Conflict join method hint.
4353-INFO: hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4353+INFO: pg_hint_plan: hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43544354 DETAIL: Conflict set hint.
4355-INFO: hint syntax error at or near "Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4355+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43564356 DETAIL: Conflict leading hint.
43574357 LOG: pg_hint_plan:
43584358 used hint:
@@ -5197,7 +5197,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id
51975197
51985198 /*+NestLoop(t1 t2)*/
51995199 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5200-INFO: hint syntax error at or near "NestLoop(t1 t2)"
5200+INFO: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t2)"
52015201 DETAIL: Relation name "t1" is ambiguous.
52025202 LOG: pg_hint_plan:
52035203 used hint:
@@ -5219,7 +5219,7 @@ NestLoop(t1 t2)
52195219
52205220 /*+Leading(t1 t2 t1)*/
52215221 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5222-INFO: hint syntax error at or near "Leading(t1 t2 t1)"
5222+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1 t2 t1)"
52235223 DETAIL: Relation name "t1" is ambiguous.
52245224 LOG: pg_hint_plan:
52255225 used hint:
@@ -5462,7 +5462,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val =
54625462
54635463 /*+Leading((t1))*/
54645464 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5465-INFO: hint syntax error at or near "Leading((t1))"
5465+INFO: pg_hint_plan: hint syntax error at or near "Leading((t1))"
54665466 DETAIL: Leading hint requires two sets of relations when parentheses nests.
54675467 LOG: pg_hint_plan:
54685468 used hint:
@@ -5509,7 +5509,7 @@ error hint:
55095509
55105510 /*+Leading((t1 t2 t3))*/
55115511 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5512-INFO: hint syntax error at or near "Leading((t1 t2 t3))"
5512+INFO: pg_hint_plan: hint syntax error at or near "Leading((t1 t2 t3))"
55135513 DETAIL: Leading hint requires two sets of relations when parentheses nests.
55145514 LOG: pg_hint_plan:
55155515 used hint:
@@ -5774,7 +5774,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val =
57745774
57755775 /*+Leading(((t1 t2) t3)) Leading(((t3 t1) t2))*/
57765776 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t1.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5777-INFO: hint syntax error at or near "Leading(((t1 t2) t3)) Leading(((t3 t1) t2))"
5777+INFO: pg_hint_plan: hint syntax error at or near "Leading(((t1 t2) t3)) Leading(((t3 t1) t2))"
57785778 DETAIL: Conflict leading hint.
57795779 LOG: pg_hint_plan:
57805780 used hint:
@@ -8128,7 +8128,7 @@ error hint:
81288128
81298129 /*+ Rows(t1 t2 #aa) */
81308130 EXPLAIN SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id); -- ERROR
8131-INFO: hint syntax error at or near "aa"
8131+INFO: pg_hint_plan: hint syntax error at or near "aa"
81328132 DETAIL: Rows hint requires valid number as rows estimation.
81338133 LOG: pg_hint_plan:
81348134 used hint:
@@ -8147,7 +8147,7 @@ Rows(t1 t2 #aa)
81478147
81488148 /*+ Rows(t1 t2 /99) */
81498149 EXPLAIN SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id); -- ERROR
8150-INFO: hint syntax error at or near "/99"
8150+INFO: pg_hint_plan: hint syntax error at or near "/99"
81518151 DETAIL: Unrecognized rows value type notation.
81528152 LOG: pg_hint_plan:
81538153 used hint:
--- a/expected/ut-A.out
+++ b/expected/ut-A.out
@@ -997,7 +997,7 @@ error hint:
997997 -- No. A-9-2-3
998998 /*+SeqScan(()*/
999999 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
1000-INFO: hint syntax error at or near "()"
1000+INFO: pg_hint_plan: hint syntax error at or near "()"
10011001 DETAIL: Zero-length delimited string.
10021002 QUERY PLAN
10031003 ----------------------------------
@@ -1024,9 +1024,9 @@ error hint:
10241024 -- No. A-9-2-4
10251025 /*+SeqScan())*/
10261026 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1027-INFO: hint syntax error at or near ")"
1027+INFO: pg_hint_plan: hint syntax error at or near ")"
10281028 DETAIL: SeqScan hint requires a relation.
1029-INFO: hint syntax error at or near ")"
1029+INFO: pg_hint_plan: hint syntax error at or near ")"
10301030 DETAIL: Unrecognized hint keyword ")".
10311031 LOG: pg_hint_plan:
10321032 used hint:
@@ -1075,7 +1075,7 @@ error hint:
10751075 -- No. A-9-2-5
10761076 /*+SeqScan(")*/
10771077 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1078-INFO: hint syntax error at or near ""
1078+INFO: pg_hint_plan: hint syntax error at or near ""
10791079 DETAIL: Unterminated quoted string.
10801080 QUERY PLAN
10811081 -----------------------------------
@@ -1117,7 +1117,7 @@ error hint:
11171117 -- No. A-9-2-6
11181118 /*+SeqScan( )*/
11191119 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1120-INFO: hint syntax error at or near ""
1120+INFO: pg_hint_plan: hint syntax error at or near ""
11211121 DETAIL: SeqScan hint requires a relation.
11221122 LOG: pg_hint_plan:
11231123 used hint:
@@ -1166,7 +1166,7 @@ error hint:
11661166 -- No. A-9-2-7
11671167 /*+SeqScan( )*/
11681168 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1169-INFO: hint syntax error at or near ""
1169+INFO: pg_hint_plan: hint syntax error at or near ""
11701170 DETAIL: SeqScan hint requires a relation.
11711171 LOG: pg_hint_plan:
11721172 used hint:
@@ -1218,7 +1218,7 @@ error hint:
12181218 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
12191219 " WHERE "
12201220 ".c1 = 1;
1221-INFO: hint syntax error at or near ""
1221+INFO: pg_hint_plan: hint syntax error at or near ""
12221222 DETAIL: SeqScan hint requires a relation.
12231223 LOG: pg_hint_plan:
12241224 used hint:
@@ -1397,7 +1397,7 @@ error hint:
13971397 -- No. A-9-2-11
13981398 /*+SeqScan(/**/)*/
13991399 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1400-INFO: hint syntax error at or near "/**/)*/
1400+INFO: pg_hint_plan: hint syntax error at or near "/**/)*/
14011401 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
14021402 DETAIL: Nested block comments are not supported.
14031403 QUERY PLAN
@@ -1408,7 +1408,7 @@ DETAIL: Nested block comments are not supported.
14081408
14091409 /*+SeqScan(/**//**//**/)*/
14101410 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1411-INFO: hint syntax error at or near "/**//**//**/)*/
1411+INFO: pg_hint_plan: hint syntax error at or near "/**//**//**/)*/
14121412 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
14131413 DETAIL: Nested block comments are not supported.
14141414 QUERY PLAN
@@ -1424,7 +1424,7 @@ Set/**/あ")*/
14241424 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
14251425 Set/**/あ" WHERE "tT()""
14261426 Set/**/あ".c1 = 1;
1427-INFO: hint syntax error at or near "/**/あ")*/
1427+INFO: pg_hint_plan: hint syntax error at or near "/**/あ")*/
14281428 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
14291429 Set/**/あ" WHERE "tT()""
14301430 Set/**/あ".c1 = 1;"
@@ -1480,7 +1480,7 @@ error hint:
14801480 -- No. A-7-4-1
14811481 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
14821482 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1483-INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1483+INFO: pg_hint_plan: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
14841484 DETAIL: Opening parenthesis is necessary.
14851485 LOG: pg_hint_plan:
14861486 used hint:
@@ -1500,7 +1500,7 @@ error hint:
15001500 -- No. A-7-4-2
15011501 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
15021502 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1503-INFO: hint syntax error at or near "(enable_bitmapscan off)SeqScan(t1)"
1503+INFO: pg_hint_plan: hint syntax error at or near "(enable_bitmapscan off)SeqScan(t1)"
15041504 DETAIL: Zero-length delimited string.
15051505 LOG: pg_hint_plan:
15061506 used hint:
@@ -1520,7 +1520,7 @@ error hint:
15201520 -- No. A-7-4-3
15211521 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
15221522 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1523-INFO: hint syntax error at or near ""
1523+INFO: pg_hint_plan: hint syntax error at or near ""
15241524 DETAIL: Unterminated quoted string.
15251525 LOG: pg_hint_plan:
15261526 used hint:
@@ -1540,7 +1540,7 @@ error hint:
15401540 -- No. A-7-4-4
15411541 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
15421542 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1543-INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1543+INFO: pg_hint_plan: hint syntax error at or near ")Set(enable_bitmapscan off)"
15441544 DETAIL: Zero-length delimited string.
15451545 LOG: pg_hint_plan:
15461546 used hint:
@@ -1560,7 +1560,7 @@ error hint:
15601560 -- No. A-7-4-5
15611561 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
15621562 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1563-INFO: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1563+INFO: pg_hint_plan: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
15641564 DETAIL: Unrecognized hint keyword "NoSet".
15651565 LOG: pg_hint_plan:
15661566 used hint:
@@ -1580,7 +1580,7 @@ error hint:
15801580 -- No. A-7-4-6
15811581 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
15821582 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1583-INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1583+INFO: pg_hint_plan: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
15841584 DETAIL: Unrecognized hint keyword ""Set"".
15851585 LOG: pg_hint_plan:
15861586 used hint:
@@ -1600,7 +1600,7 @@ error hint:
16001600 -- No. A-7-4-7
16011601 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
16021602 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1603-INFO: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1603+INFO: pg_hint_plan: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
16041604 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
16051605 DETAIL: Nested block comments are not supported.
16061606 QUERY PLAN
@@ -1868,7 +1868,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
18681868
18691869 -- No. A-8-3-4
18701870 SET pg_hint_plan.debug_print TO enable;
1871-ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1871+ERROR: invalid value for parameter "pg_hint_plan.debug_print": "enable"
1872+HINT: Available values: off, on, detailed, verbose.
18721873 SHOW pg_hint_plan.debug_print;
18731874 pg_hint_plan.debug_print
18741875 --------------------------
@@ -1908,7 +1909,7 @@ DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid:
19081909 DEBUG: StartTransactionCommand
19091910 DEBUG: StartTransaction
19101911 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1911-DEBUG: hint syntax error at or near ""
1912+DEBUG: pg_hint_plan: hint syntax error at or near ""
19121913 DETAIL: Opening parenthesis is necessary.
19131914 DEBUG: CommitTransactionCommand
19141915 DEBUG: CommitTransaction
@@ -1964,7 +1965,7 @@ DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid:
19641965 DEBUG: StartTransactionCommand
19651966 DEBUG: StartTransaction
19661967 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1967-DEBUG: hint syntax error at or near ""
1968+DEBUG: pg_hint_plan: hint syntax error at or near ""
19681969 DETAIL: Opening parenthesis is necessary.
19691970 DEBUG: CommitTransactionCommand
19701971 DEBUG: CommitTransaction
@@ -2020,7 +2021,7 @@ DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid:
20202021 DEBUG: StartTransactionCommand
20212022 DEBUG: StartTransaction
20222023 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2023-DEBUG: hint syntax error at or near ""
2024+DEBUG: pg_hint_plan: hint syntax error at or near ""
20242025 DETAIL: Opening parenthesis is necessary.
20252026 DEBUG: CommitTransactionCommand
20262027 DEBUG: CommitTransaction
@@ -2050,7 +2051,7 @@ SHOW pg_hint_plan.parse_messages;
20502051 (1 row)
20512052
20522053 /*+Set*/SELECT 1;
2053-DEBUG: hint syntax error at or near ""
2054+DEBUG: pg_hint_plan: hint syntax error at or near ""
20542055 DETAIL: Opening parenthesis is necessary.
20552056 ?column?
20562057 ----------
@@ -2073,7 +2074,7 @@ SHOW pg_hint_plan.parse_messages;
20732074 (1 row)
20742075
20752076 /*+Set*/SELECT 1;
2076-DEBUG: hint syntax error at or near ""
2077+DEBUG: pg_hint_plan: hint syntax error at or near ""
20772078 DETAIL: Opening parenthesis is necessary.
20782079 ?column?
20792080 ----------
@@ -2096,7 +2097,7 @@ SHOW pg_hint_plan.parse_messages;
20962097 (1 row)
20972098
20982099 /*+Set*/SELECT 1;
2099-LOG: hint syntax error at or near ""
2100+LOG: pg_hint_plan: hint syntax error at or near ""
21002101 DETAIL: Opening parenthesis is necessary.
21012102 ?column?
21022103 ----------
@@ -2119,7 +2120,7 @@ SHOW pg_hint_plan.parse_messages;
21192120 (1 row)
21202121
21212122 /*+Set*/SELECT 1;
2122-INFO: hint syntax error at or near ""
2123+INFO: pg_hint_plan: hint syntax error at or near ""
21232124 DETAIL: Opening parenthesis is necessary.
21242125 ?column?
21252126 ----------
@@ -2128,7 +2129,7 @@ DETAIL: Opening parenthesis is necessary.
21282129
21292130 SET client_min_messages TO notice;
21302131 /*+Set*/SELECT 1;
2131-INFO: hint syntax error at or near ""
2132+INFO: pg_hint_plan: hint syntax error at or near ""
21322133 DETAIL: Opening parenthesis is necessary.
21332134 ?column?
21342135 ----------
@@ -2144,7 +2145,7 @@ SHOW pg_hint_plan.parse_messages;
21442145 (1 row)
21452146
21462147 /*+Set*/SELECT 1;
2147-NOTICE: hint syntax error at or near ""
2148+NOTICE: pg_hint_plan: hint syntax error at or near ""
21482149 DETAIL: Opening parenthesis is necessary.
21492150 ?column?
21502151 ----------
@@ -2167,7 +2168,7 @@ SHOW pg_hint_plan.parse_messages;
21672168 (1 row)
21682169
21692170 /*+Set*/SELECT 1;
2170-WARNING: hint syntax error at or near ""
2171+WARNING: pg_hint_plan: hint syntax error at or near ""
21712172 DETAIL: Opening parenthesis is necessary.
21722173 ?column?
21732174 ----------
@@ -2190,7 +2191,7 @@ SHOW pg_hint_plan.parse_messages;
21902191 (1 row)
21912192
21922193 /*+Set*/SELECT 1;
2193-ERROR: hint syntax error at or near ""
2194+ERROR: pg_hint_plan: hint syntax error at or near ""
21942195 DETAIL: Opening parenthesis is necessary.
21952196 SET client_min_messages TO fatal;
21962197 /*+Set*/SELECT 1;
@@ -2204,7 +2205,7 @@ SHOW pg_hint_plan.parse_messages;
22042205 (1 row)
22052206
22062207 /*+Set*/SELECT 1;
2207-INFO: hint syntax error at or near ""
2208+INFO: pg_hint_plan: hint syntax error at or near ""
22082209 DETAIL: Opening parenthesis is necessary.
22092210 ?column?
22102211 ----------
@@ -2309,7 +2310,7 @@ TRUNCATE hint_plan.hints;
23092310 ----
23102311 -- No. A-9-1-1
23112312 /*+"Set"(enable_indexscan on)*/SELECT 1;
2312-INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2313+INFO: pg_hint_plan: hint syntax error at or near ""Set"(enable_indexscan on)"
23132314 DETAIL: Unrecognized hint keyword ""Set"".
23142315 ?column?
23152316 ----------
@@ -2317,9 +2318,9 @@ DETAIL: Unrecognized hint keyword ""Set"".
23172318 (1 row)
23182319
23192320 /*+Set()(enable_indexscan on)*/SELECT 1;
2320-INFO: hint syntax error at or near "Set()(enable_indexscan on)"
2321+INFO: pg_hint_plan: hint syntax error at or near "Set()(enable_indexscan on)"
23212322 DETAIL: Set hint requires name and value of GUC parameter.
2322-INFO: hint syntax error at or near "(enable_indexscan on)"
2323+INFO: pg_hint_plan: hint syntax error at or near "(enable_indexscan on)"
23232324 DETAIL: Unrecognized hint keyword "".
23242325 ?column?
23252326 ----------
@@ -2327,7 +2328,7 @@ DETAIL: Unrecognized hint keyword "".
23272328 (1 row)
23282329
23292330 /*+Set(enable_indexscan on*/SELECT 1;
2330-INFO: hint syntax error at or near ""
2331+INFO: pg_hint_plan: hint syntax error at or near ""
23312332 DETAIL: Closing parenthesis is necessary.
23322333 ?column?
23332334 ----------
@@ -2382,7 +2383,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
23822383
23832384 /*+TidScan(t1)BitmapScan(t1)*/
23842385 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2385-INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2386+INFO: pg_hint_plan: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
23862387 DETAIL: Conflict scan method hint.
23872388 LOG: pg_hint_plan:
23882389 used hint:
@@ -2403,9 +2404,9 @@ error hint:
24032404
24042405 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
24052406 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2406-INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2407+INFO: pg_hint_plan: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
24072408 DETAIL: Conflict scan method hint.
2408-INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2409+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
24092410 DETAIL: Conflict scan method hint.
24102411 LOG: pg_hint_plan:
24112412 used hint:
@@ -2425,11 +2426,11 @@ error hint:
24252426
24262427 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
24272428 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2428-INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2429+INFO: pg_hint_plan: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
24292430 DETAIL: Conflict scan method hint.
2430-INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2431+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
24312432 DETAIL: Conflict scan method hint.
2432-INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2433+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
24332434 DETAIL: Conflict scan method hint.
24342435 LOG: pg_hint_plan:
24352436 used hint:
@@ -3376,7 +3377,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
33763377 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
33773378 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
33783379 EXPLAIN (COSTS false) EXECUTE p1;
3379-INFO: hint syntax error at or near "NestLoop(t1 t1)"
3380+INFO: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t1)"
33803381 DETAIL: Relation name "t1" is duplicated.
33813382 LOG: pg_hint_plan:
33823383 used hint:
@@ -3439,7 +3440,7 @@ SELECT name, setting FROM settings;
34393440 SET pg_hint_plan.parse_messages TO error;
34403441 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
34413442 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3442-ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3443+ERROR: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t1)"
34433444 DETAIL: Relation name "t1" is duplicated.
34443445 SELECT name, setting FROM settings;
34453446 name | setting
@@ -3538,7 +3539,7 @@ SELECT name, setting FROM settings;
35383539 SET pg_hint_plan.parse_messages TO error;
35393540 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
35403541 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3541-ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3542+ERROR: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t1)"
35423543 DETAIL: Relation name "t1" is duplicated.
35433544 SELECT name, setting FROM settings;
35443545 name | setting
@@ -4712,7 +4713,7 @@ error hint:
47124713 EXPLAIN (COSTS false)
47134714 SELECT recall_planner() FROM s1.t1 t_1
47144715 ORDER BY t_1.c1;
4715-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4716+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
47164717 DETAIL: Relation name "t_1" is duplicated.
47174718 CONTEXT: SQL function "recall_planner" during startup
47184719 LOG: pg_hint_plan:
@@ -4768,7 +4769,7 @@ duplication hint:
47684769 error hint:
47694770
47704771 CONTEXT: SQL function "recall_planner_one_t" during startup
4771-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4772+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
47724773 DETAIL: Relation name "t_1" is duplicated.
47734774 LOG: pg_hint_plan:
47744775 used hint:
@@ -4795,7 +4796,7 @@ EXPLAIN (COSTS false)
47954796 SELECT recall_planner() FROM s1.t1 t_1
47964797 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
47974798 ORDER BY t_1.c1;
4798-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4799+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
47994800 DETAIL: Relation name "t_1" is duplicated.
48004801 CONTEXT: SQL function "recall_planner" during startup
48014802 LOG: pg_hint_plan:
@@ -4806,7 +4807,7 @@ error hint:
48064807 HashJoin(t_1 t_1)
48074808
48084809 CONTEXT: SQL function "recall_planner" during startup
4809-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4810+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
48104811 DETAIL: Relation name "t_1" is duplicated.
48114812 LOG: pg_hint_plan:
48124813 used hint:
@@ -4831,9 +4832,9 @@ EXPLAIN (COSTS false)
48314832 SELECT recall_planner() FROM s1.t1 t_1
48324833 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
48334834 ORDER BY t_1.c1;
4834-INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4835+INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
48354836 DETAIL: Conflict join method hint.
4836-INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4837+INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
48374838 DETAIL: Conflict join method hint.
48384839 CONTEXT: SQL function "recall_planner" during startup
48394840 LOG: pg_hint_plan:
--- a/expected/ut-G.out
+++ b/expected/ut-G.out
@@ -778,7 +778,7 @@ SET client_min_messages TO LOG;
778778 -- No. G-2-3-1
779779 /*+Set(enable_indexscan on)Set(enable_indexscan off)*/
780780 SELECT * FROM s1.t1 WHERE false;
781-INFO: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan off)"
781+INFO: pg_hint_plan: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan off)"
782782 DETAIL: Conflict set hint.
783783 LOG: pg_hint_plan:
784784 used hint:
@@ -795,9 +795,9 @@ error hint:
795795 -- No. G-2-3-2
796796 /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)*/
797797 SELECT * FROM s1.t1 WHERE false;
798-INFO: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
798+INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
799799 DETAIL: Conflict set hint.
800-INFO: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
800+INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
801801 DETAIL: Conflict set hint.
802802 LOG: pg_hint_plan:
803803 used hint:
@@ -815,7 +815,7 @@ error hint:
815815 -- No. G-2-3-3
816816 /*+Set(enable_indexscan on)Set(enable_indexscan o)*/
817817 SELECT * FROM s1.t1 WHERE false;
818-INFO: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan o)"
818+INFO: pg_hint_plan: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan o)"
819819 DETAIL: Conflict set hint.
820820 INFO: parameter "enable_indexscan" requires a Boolean value
821821 LOG: pg_hint_plan:
@@ -833,9 +833,9 @@ Set(enable_indexscan o)
833833 -- No. G-2-3-4
834834 /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)*/
835835 SELECT * FROM s1.t1 WHERE false;
836-INFO: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
836+INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
837837 DETAIL: Conflict set hint.
838-INFO: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
838+INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
839839 DETAIL: Conflict set hint.
840840 INFO: invalid value for parameter "client_min_messages": "DEBU"
841841 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error.
@@ -858,9 +858,9 @@ Set(client_min_messages DEBU)
858858 -- No. G-2-4-1
859859 /*+SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) */
860860 SELECT * FROM s1.t1 a, s1.t2 b WHERE false;
861-INFO: hint syntax error at or near " "
861+INFO: pg_hint_plan: hint syntax error at or near " "
862862 DETAIL: NestLoop hint requires at least two relations.
863-INFO: hint syntax error at or near "SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) "
863+INFO: pg_hint_plan: hint syntax error at or near "SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) "
864864 DETAIL: Conflict scan method hint.
865865 LOG: pg_hint_plan:
866866 used hint:
--- a/expected/ut-J.out
+++ b/expected/ut-J.out
@@ -195,7 +195,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
195195
196196 /*+HashJoin(t1 t1)*/
197197 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
198-INFO: hint syntax error at or near "HashJoin(t1 t1)"
198+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t1)"
199199 DETAIL: Relation name "t1" is ambiguous.
200200 LOG: pg_hint_plan:
201201 used hint:
@@ -357,7 +357,7 @@ error hint:
357357 -- No. J-1-5-2
358358 /*+HashJoin(t1 t1)*/
359359 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
360-INFO: hint syntax error at or near "HashJoin(t1 t1)"
360+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t1)"
361361 DETAIL: Relation name "t1" is duplicated.
362362 LOG: pg_hint_plan:
363363 used hint:
@@ -379,9 +379,9 @@ HashJoin(t1 t1)
379379 -- No. J-1-5-3
380380 /*+HashJoin(t1 t1)HashJoin(t2 t2)*/
381381 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
382-INFO: hint syntax error at or near "HashJoin(t1 t1)HashJoin(t2 t2)"
382+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t1)HashJoin(t2 t2)"
383383 DETAIL: Relation name "t1" is duplicated.
384-INFO: hint syntax error at or near "HashJoin(t2 t2)"
384+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t2 t2)"
385385 DETAIL: Relation name "t2" is duplicated.
386386 LOG: pg_hint_plan:
387387 used hint:
@@ -417,7 +417,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND
417417
418418 /*+HashJoin(t1 t2 t1 t2)*/
419419 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
420-INFO: hint syntax error at or near "HashJoin(t1 t2 t1 t2)"
420+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2 t1 t2)"
421421 DETAIL: Relation name "t1" is duplicated.
422422 LOG: pg_hint_plan:
423423 used hint:
@@ -3650,7 +3650,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
36503650
36513651 /*+HashJoin(v1t1 v1t1)*/
36523652 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3653-INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)"
3653+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
36543654 DETAIL: Relation name "v1t1" is ambiguous.
36553655 LOG: pg_hint_plan:
36563656 used hint:
@@ -3709,7 +3709,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
37093709
37103710 /*+HashJoin(r4t1 r4t1)*/
37113711 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3712-INFO: hint syntax error at or near "HashJoin(r4t1 r4t1)"
3712+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(r4t1 r4t1)"
37133713 DETAIL: Relation name "r4t1" is ambiguous.
37143714 LOG: pg_hint_plan:
37153715 used hint:
@@ -3864,11 +3864,11 @@ error hint:
38643864
38653865 /*+ Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)*/
38663866 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
3867-INFO: hint syntax error at or near "HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
3867+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
38683868 DETAIL: Relation name "*VALUES*" is ambiguous.
3869-INFO: hint syntax error at or near "MergeJoin(*VALUES* t3 t2 t1)"
3869+INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(*VALUES* t3 t2 t1)"
38703870 DETAIL: Relation name "*VALUES*" is ambiguous.
3871-INFO: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
3871+INFO: pg_hint_plan: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
38723872 DETAIL: Relation name "*VALUES*" is ambiguous.
38733873 LOG: pg_hint_plan:
38743874 used hint:
@@ -4394,7 +4394,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
43944394 -- No. J-3-3-1
43954395 /*+HashJoin(t1 t2)NestLoop(t1 t2)*/
43964396 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4397-INFO: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
4397+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
43984398 DETAIL: Conflict join method hint.
43994399 LOG: pg_hint_plan:
44004400 used hint:
@@ -4415,9 +4415,9 @@ error hint:
44154415 -- No. J-3-3-2
44164416 /*+MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)*/
44174417 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4418-INFO: hint syntax error at or near "MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)"
4418+INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)"
44194419 DETAIL: Conflict join method hint.
4420-INFO: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
4420+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
44214421 DETAIL: Conflict join method hint.
44224422 LOG: pg_hint_plan:
44234423 used hint:
@@ -4439,7 +4439,7 @@ error hint:
44394439 -- No. J-3-3-3
44404440 /*+HashJoin(t1 t2)NestLoop(t2 t1)*/
44414441 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4442-INFO: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
4442+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
44434443 DETAIL: Conflict join method hint.
44444444 LOG: pg_hint_plan:
44454445 used hint:
@@ -4460,9 +4460,9 @@ error hint:
44604460 -- No. J-3-3-4
44614461 /*+MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)*/
44624462 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4463-INFO: hint syntax error at or near "MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)"
4463+INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)"
44644464 DETAIL: Conflict join method hint.
4465-INFO: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
4465+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
44664466 DETAIL: Conflict join method hint.
44674467 LOG: pg_hint_plan:
44684468 used hint:
@@ -4571,7 +4571,7 @@ error hint:
45714571 -- No. J-3-4-7
45724572 /*+NestLoop()*/
45734573 SELECT * FROM s1.t1 WHERE false;
4574-INFO: hint syntax error at or near ""
4574+INFO: pg_hint_plan: hint syntax error at or near ""
45754575 DETAIL: NestLoop hint requires at least two relations.
45764576 LOG: pg_hint_plan:
45774577 used hint:
@@ -4587,7 +4587,7 @@ NestLoop()
45874587 -- No. J-3-4-8
45884588 /*+NestLoop(t1)*/
45894589 SELECT * FROM s1.t1 WHERE false;
4590-INFO: hint syntax error at or near ""
4590+INFO: pg_hint_plan: hint syntax error at or near ""
45914591 DETAIL: NestLoop hint requires at least two relations.
45924592 LOG: pg_hint_plan:
45934593 used hint:
--- a/expected/ut-L.out
+++ b/expected/ut-L.out
@@ -270,7 +270,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 WHERE s1.t1.c1 =
270270
271271 /*+Leading(t1 t2 t3 t1)*/
272272 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 WHERE s1.t1.c1 = t2.c1 AND s1.t1.c1 = t3.c1 AND s1.t1.c1 = s2.t1.c1;
273-INFO: hint syntax error at or near "Leading(t1 t2 t3 t1)"
273+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1 t2 t3 t1)"
274274 DETAIL: Relation name "t1" is ambiguous.
275275 LOG: pg_hint_plan:
276276 used hint:
@@ -513,7 +513,7 @@ error hint:
513513 -- No. L-1-5-2
514514 /*+Leading(t4 t2 t3 t1 t4)*/
515515 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
516-INFO: hint syntax error at or near "Leading(t4 t2 t3 t1 t4)"
516+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t3 t1 t4)"
517517 DETAIL: Relation name "t4" is duplicated.
518518 LOG: pg_hint_plan:
519519 used hint:
@@ -540,7 +540,7 @@ Leading(t4 t2 t3 t1 t4)
540540
541541 /*+Leading(t4 t2 t3 t4)*/
542542 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
543-INFO: hint syntax error at or near "Leading(t4 t2 t3 t4)"
543+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t3 t4)"
544544 DETAIL: Relation name "t4" is duplicated.
545545 LOG: pg_hint_plan:
546546 used hint:
@@ -568,7 +568,7 @@ Leading(t4 t2 t3 t4)
568568 -- No. L-1-5-3
569569 /*+Leading(t4 t2 t3 t1 t4 t2 t3 t1)*/
570570 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
571-INFO: hint syntax error at or near "Leading(t4 t2 t3 t1 t4 t2 t3 t1)"
571+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t3 t1 t4 t2 t3 t1)"
572572 DETAIL: Relation name "t4" is duplicated.
573573 LOG: pg_hint_plan:
574574 used hint:
@@ -595,7 +595,7 @@ Leading(t4 t2 t3 t1 t4 t2 t3 t1)
595595
596596 /*+Leading(t4 t2 t2 t4)*/
597597 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
598-INFO: hint syntax error at or near "Leading(t4 t2 t2 t4)"
598+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t2 t4)"
599599 DETAIL: Relation name "t2" is duplicated.
600600 LOG: pg_hint_plan:
601601 used hint:
@@ -3465,7 +3465,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
34653465
34663466 /*+Leading(v1t1 v1t1)*/
34673467 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3468-INFO: hint syntax error at or near "Leading(v1t1 v1t1)"
3468+INFO: pg_hint_plan: hint syntax error at or near "Leading(v1t1 v1t1)"
34693469 DETAIL: Relation name "v1t1" is ambiguous.
34703470 LOG: pg_hint_plan:
34713471 used hint:
@@ -3525,7 +3525,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
35253525
35263526 /*+Leading(r4t1 r4t1)*/
35273527 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3528-INFO: hint syntax error at or near "Leading(r4t1 r4t1)"
3528+INFO: pg_hint_plan: hint syntax error at or near "Leading(r4t1 r4t1)"
35293529 DETAIL: Relation name "r4t1" is ambiguous.
35303530 LOG: pg_hint_plan:
35313531 used hint:
@@ -3673,7 +3673,7 @@ error hint:
36733673
36743674 /*+ Leading(*VALUES* t3 t2 t1) */
36753675 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
3676-INFO: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) "
3676+INFO: pg_hint_plan: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) "
36773677 DETAIL: Relation name "*VALUES*" is ambiguous.
36783678 LOG: pg_hint_plan:
36793679 used hint:
@@ -4095,7 +4095,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1
40954095 EXPLAIN (COSTS false) SELECT * FROM s1.t1
40964096 JOIN s1.t2 ON (t1.c1 = t2.c1)
40974097 JOIN s1.t3 ON (t1.c1 = t3.c1);
4098-INFO: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
4098+INFO: pg_hint_plan: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
40994099 DETAIL: Conflict leading hint.
41004100 LOG: pg_hint_plan:
41014101 used hint:
@@ -4124,9 +4124,9 @@ error hint:
41244124 EXPLAIN (COSTS false) SELECT * FROM s1.t1
41254125 JOIN s1.t2 ON (t1.c1 = t2.c1)
41264126 JOIN s1.t3 ON (t1.c1 = t3.c1);
4127-INFO: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading(t1 t2 t3)"
4127+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading(t1 t2 t3)"
41284128 DETAIL: Conflict leading hint.
4129-INFO: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
4129+INFO: pg_hint_plan: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
41304130 DETAIL: Conflict leading hint.
41314131 LOG: pg_hint_plan:
41324132 used hint:
@@ -4156,7 +4156,7 @@ error hint:
41564156 EXPLAIN (COSTS false) SELECT * FROM s1.t1
41574157 JOIN s1.t2 ON (t1.c1 = t2.c1)
41584158 JOIN s1.t3 ON (t1.c1 = t3.c1);
4159-INFO: hint syntax error at or near "Leading()"
4159+INFO: pg_hint_plan: hint syntax error at or near "Leading()"
41604160 DETAIL: Leading hint requires at least two relations.
41614161 LOG: pg_hint_plan:
41624162 used hint:
@@ -4185,9 +4185,9 @@ Leading()
41854185 EXPLAIN (COSTS false) SELECT * FROM s1.t1
41864186 JOIN s1.t2 ON (t1.c1 = t2.c1)
41874187 JOIN s1.t3 ON (t1.c1 = t3.c1);
4188-INFO: hint syntax error at or near "Leading()"
4188+INFO: pg_hint_plan: hint syntax error at or near "Leading()"
41894189 DETAIL: Leading hint requires at least two relations.
4190-INFO: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading()"
4190+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading()"
41914191 DETAIL: Conflict leading hint.
41924192 LOG: pg_hint_plan:
41934193 used hint:
@@ -4220,7 +4220,7 @@ Leading()
42204220 EXPLAIN (COSTS false) SELECT * FROM s1.t1
42214221 JOIN s1.t2 ON (t1.c1 = t2.c1)
42224222 JOIN s1.t3 ON (t1.c1 = t3.c1);
4223-INFO: hint syntax error at or near "Leading()"
4223+INFO: pg_hint_plan: hint syntax error at or near "Leading()"
42244224 DETAIL: Leading hint requires at least two relations.
42254225 LOG: pg_hint_plan:
42264226 used hint:
@@ -4247,7 +4247,7 @@ Leading()
42474247 EXPLAIN (COSTS false) SELECT * FROM s1.t1
42484248 JOIN s1.t2 ON (t1.c1 = t2.c1)
42494249 JOIN s1.t3 ON (t1.c1 = t3.c1);
4250-INFO: hint syntax error at or near "Leading(t1)"
4250+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1)"
42514251 DETAIL: Leading hint requires at least two relations.
42524252 LOG: pg_hint_plan:
42534253 used hint:
@@ -4326,7 +4326,7 @@ error hint:
43264326 -- No. L-3-6-1
43274327 /*+Leading((t2))*/
43284328 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
4329-INFO: hint syntax error at or near "Leading((t2))"
4329+INFO: pg_hint_plan: hint syntax error at or near "Leading((t2))"
43304330 DETAIL: Leading hint requires two sets of relations when parentheses nests.
43314331 LOG: pg_hint_plan:
43324332 used hint:
@@ -4380,7 +4380,7 @@ error hint:
43804380 -- No. L-3-6-3
43814381 /*+Leading((t2 t3 t4))*/
43824382 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
4383-INFO: hint syntax error at or near "Leading((t2 t3 t4))"
4383+INFO: pg_hint_plan: hint syntax error at or near "Leading((t2 t3 t4))"
43844384 DETAIL: Leading hint requires two sets of relations when parentheses nests.
43854385 LOG: pg_hint_plan:
43864386 used hint:
@@ -4436,7 +4436,7 @@ error hint:
44364436 -- No. L-3-6-5
44374437 /*+Leading((((t1 t3) t4) t2)))*/
44384438 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
4439-INFO: hint syntax error at or near ")"
4439+INFO: pg_hint_plan: hint syntax error at or near ")"
44404440 DETAIL: Unrecognized hint keyword ")".
44414441 LOG: pg_hint_plan:
44424442 used hint:
--- a/expected/ut-R.out
+++ b/expected/ut-R.out
@@ -137,7 +137,7 @@ error hint:
137137 EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
138138 /*+Rows(t1 t1 #1)*/
139139 EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
140-INFO: hint syntax error at or near "Rows(t1 t1 #1)"
140+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t1 #1)"
141141 DETAIL: Relation name "t1" is ambiguous.
142142 LOG: pg_hint_plan:
143143 used hint:
@@ -214,7 +214,7 @@ error hint:
214214 \o results/R_1-5-2.out.log
215215 /*+Rows(t1 t1 #1)*/
216216 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
217-INFO: hint syntax error at or near "Rows(t1 t1 #1)"
217+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t1 #1)"
218218 DETAIL: Relation name "t1" is duplicated.
219219 LOG: pg_hint_plan:
220220 used hint:
@@ -230,12 +230,12 @@ Rows(t1 t1 #1)
230230 \o results/R_1-5-3.out.log
231231 /*+(t1 t1)(t2 t2)*/
232232 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
233-INFO: hint syntax error at or near "(t1 t1)(t2 t2)"
233+INFO: pg_hint_plan: hint syntax error at or near "(t1 t1)(t2 t2)"
234234 DETAIL: Unrecognized hint keyword "".
235235 EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
236236 /*+(t1 t2 t1 t2)*/
237237 EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
238-INFO: hint syntax error at or near "(t1 t2 t1 t2)"
238+INFO: pg_hint_plan: hint syntax error at or near "(t1 t2 t1 t2)"
239239 DETAIL: Unrecognized hint keyword "".
240240 \o
241241 \! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_1-5-3.out.log > results/R_1-5-3.out
@@ -482,7 +482,7 @@ error hint:
482482 \o results/R_1-7-1.out.log
483483 /*+Rows(t1 #1)*/
484484 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
485-INFO: hint syntax error at or near ""
485+INFO: pg_hint_plan: hint syntax error at or near ""
486486 DETAIL: Rows hint requires at least two relations.
487487 LOG: pg_hint_plan:
488488 used hint:
@@ -498,7 +498,7 @@ Rows(t1 #1)
498498 \o results/R_1-7-2.out.log
499499 /*+Rows(t1 t2 1)*/
500500 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
501-INFO: hint syntax error at or near "1"
501+INFO: pg_hint_plan: hint syntax error at or near "1"
502502 DETAIL: Unrecognized rows value type notation.
503503 LOG: pg_hint_plan:
504504 used hint:
@@ -514,7 +514,7 @@ Rows(t1 t2 1)
514514 \o results/R_1-7-3.out.log
515515 /*+Rows(t1 t2 #notrows)*/
516516 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
517-INFO: hint syntax error at or near "notrows"
517+INFO: pg_hint_plan: hint syntax error at or near "notrows"
518518 DETAIL: Rows hint requires valid number as rows estimation.
519519 LOG: pg_hint_plan:
520520 used hint:
@@ -1964,7 +1964,7 @@ error hint:
19641964 \o results/R_2-3-4.out.log
19651965 /*+HashJoin(v1t1 v1t1)*/
19661966 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
1967-INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)"
1967+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
19681968 DETAIL: Relation name "v1t1" is ambiguous.
19691969 LOG: pg_hint_plan:
19701970 used hint:
@@ -1975,9 +1975,9 @@ HashJoin(v1t1 v1t1)
19751975
19761976 /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/
19771977 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
1978-INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
1978+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
19791979 DETAIL: Relation name "v1t1" is ambiguous.
1980-INFO: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
1980+INFO: pg_hint_plan: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
19811981 DETAIL: Relation name "v1t1" is ambiguous.
19821982 LOG: pg_hint_plan:
19831983 used hint:
@@ -2018,11 +2018,11 @@ error hint:
20182018 \o results/R_2-3-6.out.log
20192019 /*+RowsHashJoin(r4t1 r4t1)*/
20202020 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
2021-INFO: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
2021+INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
20222022 DETAIL: Unrecognized hint keyword "RowsHashJoin".
20232023 /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/
20242024 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
2025-INFO: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
2025+INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
20262026 DETAIL: Unrecognized hint keyword "RowsHashJoin".
20272027 \o
20282028 \! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_2-3-6.out.log > results/R_2-3-6.out
@@ -2099,11 +2099,11 @@ error hint:
20992099
21002100 /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
21012101 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
2102-INFO: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
2102+INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
21032103 DETAIL: Relation name "*VALUES*" is ambiguous.
2104-INFO: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
2104+INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
21052105 DETAIL: Relation name "*VALUES*" is ambiguous.
2106-INFO: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
2106+INFO: pg_hint_plan: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
21072107 DETAIL: Relation name "*VALUES*" is ambiguous.
21082108 LOG: pg_hint_plan:
21092109 used hint:
@@ -2343,7 +2343,7 @@ error hint:
23432343 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23442344 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/
23452345 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2346-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
2346+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
23472347 DETAIL: Conflict rows hint.
23482348 LOG: pg_hint_plan:
23492349 used hint:
@@ -2361,9 +2361,9 @@ error hint:
23612361 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23622362 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/
23632363 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2364-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
2364+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
23652365 DETAIL: Conflict rows hint.
2366-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
2366+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
23672367 DETAIL: Conflict rows hint.
23682368 LOG: pg_hint_plan:
23692369 used hint:
@@ -2382,7 +2382,7 @@ error hint:
23822382 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23832383 /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/
23842384 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2385-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
2385+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
23862386 DETAIL: Conflict rows hint.
23872387 LOG: pg_hint_plan:
23882388 used hint:
@@ -2400,9 +2400,9 @@ error hint:
24002400 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
24012401 /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/
24022402 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2403-INFO: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
2403+INFO: pg_hint_plan: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
24042404 DETAIL: Conflict rows hint.
2405-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
2405+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
24062406 DETAIL: Conflict rows hint.
24072407 LOG: pg_hint_plan:
24082408 used hint:
--- a/expected/ut-S.out
+++ b/expected/ut-S.out
@@ -3023,7 +3023,7 @@ EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4),
30233023
30243024 /*+SeqScan(t1 t2)*/
30253025 EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
3026-INFO: hint syntax error at or near ""
3026+INFO: pg_hint_plan: hint syntax error at or near ""
30273027 DETAIL: SeqScan hint accepts only one relation.
30283028 LOG: pg_hint_plan:
30293029 used hint:
@@ -5327,7 +5327,7 @@ error hint:
53275327 -- No. S-3-12-1
53285328 /*+IndexScan(ti1) BitmapScan(ti1)*/
53295329 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5330-INFO: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
5330+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
53315331 DETAIL: Conflict scan method hint.
53325332 LOG: pg_hint_plan:
53335333 used hint:
@@ -5349,7 +5349,7 @@ error hint:
53495349 -- No. S-3-12-2
53505350 /*+IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/
53515351 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5352-INFO: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
5352+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
53535353 DETAIL: Conflict scan method hint.
53545354 LOG: available indexes for BitmapScan(ti1): ti1_btree
53555355 LOG: pg_hint_plan:
@@ -5372,9 +5372,9 @@ error hint:
53725372 -- No. S-3-12-3
53735373 /*+BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)*/
53745374 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5375-INFO: hint syntax error at or near "BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)"
5375+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)"
53765376 DETAIL: Conflict scan method hint.
5377-INFO: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
5377+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
53785378 DETAIL: Conflict scan method hint.
53795379 LOG: pg_hint_plan:
53805380 used hint:
@@ -5397,9 +5397,9 @@ error hint:
53975397 -- No. S-3-12-4
53985398 /*+BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/
53995399 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5400-INFO: hint syntax error at or near "BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
5400+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
54015401 DETAIL: Conflict scan method hint.
5402-INFO: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
5402+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
54035403 DETAIL: Conflict scan method hint.
54045404 LOG: available indexes for BitmapScan(ti1): ti1_btree
54055405 LOG: pg_hint_plan:
@@ -5442,7 +5442,7 @@ error hint:
54425442 -- No. S-3-13-2
54435443 /*+SeqScan(ti1 ti1_pkey)*/
54445444 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5445-INFO: hint syntax error at or near ""
5445+INFO: pg_hint_plan: hint syntax error at or near ""
54465446 DETAIL: SeqScan hint accepts only one relation.
54475447 LOG: pg_hint_plan:
54485448 used hint:
@@ -5461,7 +5461,7 @@ SeqScan(ti1 ti1_pkey)
54615461 -- No. S-3-13-3
54625462 /*+SeqScan(ti1 ti1_pkey ti1_btree)*/
54635463 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5464-INFO: hint syntax error at or near ""
5464+INFO: pg_hint_plan: hint syntax error at or near ""
54655465 DETAIL: SeqScan hint accepts only one relation.
54665466 LOG: pg_hint_plan:
54675467 used hint:
@@ -5609,7 +5609,7 @@ error hint:
56095609 -- No. S-3-13-11
56105610 /*+TidScan(ti1 ti1_pkey)*/
56115611 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5612-INFO: hint syntax error at or near ""
5612+INFO: pg_hint_plan: hint syntax error at or near ""
56135613 DETAIL: TidScan hint accepts only one relation.
56145614 LOG: pg_hint_plan:
56155615 used hint:
@@ -5628,7 +5628,7 @@ TidScan(ti1 ti1_pkey)
56285628 -- No. S-3-13-12
56295629 /*+TidScan(ti1 ti1_pkey ti1_btree)*/
56305630 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5631-INFO: hint syntax error at or near ""
5631+INFO: pg_hint_plan: hint syntax error at or near ""
56325632 DETAIL: TidScan hint accepts only one relation.
56335633 LOG: pg_hint_plan:
56345634 used hint:
@@ -5664,7 +5664,7 @@ error hint:
56645664 -- No. S-3-13-14
56655665 /*+NoSeqScan(ti1 ti1_pkey)*/
56665666 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5667-INFO: hint syntax error at or near ""
5667+INFO: pg_hint_plan: hint syntax error at or near ""
56685668 DETAIL: NoSeqScan hint accepts only one relation.
56695669 LOG: pg_hint_plan:
56705670 used hint:
@@ -5683,7 +5683,7 @@ NoSeqScan(ti1 ti1_pkey)
56835683 -- No. S-3-13-15
56845684 /*+NoSeqScan(ti1 ti1_pkey ti1_btree)*/
56855685 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5686-INFO: hint syntax error at or near ""
5686+INFO: pg_hint_plan: hint syntax error at or near ""
56875687 DETAIL: NoSeqScan hint accepts only one relation.
56885688 LOG: pg_hint_plan:
56895689 used hint:
@@ -5719,7 +5719,7 @@ error hint:
57195719 -- No. S-3-13-17
57205720 /*+NoIndexScan(ti1 ti1_pkey)*/
57215721 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5722-INFO: hint syntax error at or near ""
5722+INFO: pg_hint_plan: hint syntax error at or near ""
57235723 DETAIL: NoIndexScan hint accepts only one relation.
57245724 LOG: pg_hint_plan:
57255725 used hint:
@@ -5738,7 +5738,7 @@ NoIndexScan(ti1 ti1_pkey)
57385738 -- No. S-3-13-18
57395739 /*+NoIndexScan(ti1 ti1_pkey ti1_btree)*/
57405740 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5741-INFO: hint syntax error at or near ""
5741+INFO: pg_hint_plan: hint syntax error at or near ""
57425742 DETAIL: NoIndexScan hint accepts only one relation.
57435743 LOG: pg_hint_plan:
57445744 used hint:
@@ -5774,7 +5774,7 @@ error hint:
57745774 -- No. S-3-13-20
57755775 /*+NoBitmapScan(ti1 ti1_pkey)*/
57765776 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5777-INFO: hint syntax error at or near ""
5777+INFO: pg_hint_plan: hint syntax error at or near ""
57785778 DETAIL: NoBitmapScan hint accepts only one relation.
57795779 LOG: pg_hint_plan:
57805780 used hint:
@@ -5793,7 +5793,7 @@ NoBitmapScan(ti1 ti1_pkey)
57935793 -- No. S-3-13-21
57945794 /*+NoBitmapScan(ti1 ti1_pkey ti1_btree)*/
57955795 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5796-INFO: hint syntax error at or near ""
5796+INFO: pg_hint_plan: hint syntax error at or near ""
57975797 DETAIL: NoBitmapScan hint accepts only one relation.
57985798 LOG: pg_hint_plan:
57995799 used hint:
@@ -5829,7 +5829,7 @@ error hint:
58295829 -- No. S-3-13-23
58305830 /*+NoTidScan(ti1 ti1_pkey)*/
58315831 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5832-INFO: hint syntax error at or near ""
5832+INFO: pg_hint_plan: hint syntax error at or near ""
58335833 DETAIL: NoTidScan hint accepts only one relation.
58345834 LOG: pg_hint_plan:
58355835 used hint:
@@ -5848,7 +5848,7 @@ NoTidScan(ti1 ti1_pkey)
58485848 -- No. S-3-13-24
58495849 /*+NoTidScan(ti1 ti1_pkey ti1_btree)*/
58505850 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5851-INFO: hint syntax error at or near ""
5851+INFO: pg_hint_plan: hint syntax error at or near ""
58525852 DETAIL: NoTidScan hint accepts only one relation.
58535853 LOG: pg_hint_plan:
58545854 used hint:
@@ -5933,7 +5933,7 @@ error hint:
59335933 -- No. S-3-13-29
59345934 /*+NoIndexOnlyScan(ti1 ti1_pkey)*/
59355935 EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1;
5936-INFO: hint syntax error at or near ""
5936+INFO: pg_hint_plan: hint syntax error at or near ""
59375937 DETAIL: NoIndexOnlyScan hint accepts only one relation.
59385938 LOG: pg_hint_plan:
59395939 used hint:
@@ -5951,7 +5951,7 @@ NoIndexOnlyScan(ti1 ti1_pkey)
59515951 -- No. S-3-13-30
59525952 /*+NoIndexOnlyScan(ti1 ti1_pkey ti1_btree)*/
59535953 EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1;
5954-INFO: hint syntax error at or near ""
5954+INFO: pg_hint_plan: hint syntax error at or near ""
59555955 DETAIL: NoIndexOnlyScan hint accepts only one relation.
59565956 LOG: pg_hint_plan:
59575957 used hint:
--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -90,8 +90,9 @@ PG_MODULE_MAGIC;
9090 #define HINT_ARRAY_DEFAULT_INITSIZE 8
9191
9292 #define hint_ereport(str, detail) \
93- ereport(pg_hint_plan_parse_messages, \
94- (errmsg("hint syntax error at or near \"%s\"", (str)), \
93+ ereport(pg_hint_plan_message_level, \
94+ (errhidestmt(hidestmt), \
95+ errmsg("pg_hint_plan%s: hint syntax error at or near \"%s\"", qnostr, (str)), \
9596 errdetail detail))
9697
9798 #define skip_space(str) \
@@ -156,7 +157,7 @@ typedef Hint *(*HintCreateFunction) (const char *hint_str,
156157 const char *keyword,
157158 HintKeyword hint_keyword);
158159 typedef void (*HintDeleteFunction) (Hint *hint);
159-typedef void (*HintDescFunction) (Hint *hint, StringInfo buf);
160+typedef void (*HintDescFunction) (Hint *hint, StringInfo buf, bool nolf);
160161 typedef int (*HintCmpFunction) (const Hint *a, const Hint *b);
161162 typedef const char *(*HintParseFunction) (Hint *hint, HintState *hstate,
162163 Query *parse, const char *str);
@@ -193,6 +194,9 @@ typedef enum HintStatus
193194 #define hint_state_enabled(hint) ((hint)->base.state == HINT_STATE_NOTUSED || \
194195 (hint)->base.state == HINT_STATE_USED)
195196
197+static unsigned int qno = 0;
198+static char qnostr[32];
199+
196200 /* common data for all hints. */
197201 struct Hint
198202 {
@@ -357,35 +361,35 @@ static RelOptInfo *pg_hint_plan_join_search(PlannerInfo *root,
357361 static Hint *ScanMethodHintCreate(const char *hint_str, const char *keyword,
358362 HintKeyword hint_keyword);
359363 static void ScanMethodHintDelete(ScanMethodHint *hint);
360-static void ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf);
364+static void ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf, bool nolf);
361365 static int ScanMethodHintCmp(const ScanMethodHint *a, const ScanMethodHint *b);
362366 static const char *ScanMethodHintParse(ScanMethodHint *hint, HintState *hstate,
363367 Query *parse, const char *str);
364368 static Hint *JoinMethodHintCreate(const char *hint_str, const char *keyword,
365369 HintKeyword hint_keyword);
366370 static void JoinMethodHintDelete(JoinMethodHint *hint);
367-static void JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf);
371+static void JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf, bool nolf);
368372 static int JoinMethodHintCmp(const JoinMethodHint *a, const JoinMethodHint *b);
369373 static const char *JoinMethodHintParse(JoinMethodHint *hint, HintState *hstate,
370374 Query *parse, const char *str);
371375 static Hint *LeadingHintCreate(const char *hint_str, const char *keyword,
372376 HintKeyword hint_keyword);
373377 static void LeadingHintDelete(LeadingHint *hint);
374-static void LeadingHintDesc(LeadingHint *hint, StringInfo buf);
378+static void LeadingHintDesc(LeadingHint *hint, StringInfo buf, bool nolf);
375379 static int LeadingHintCmp(const LeadingHint *a, const LeadingHint *b);
376380 static const char *LeadingHintParse(LeadingHint *hint, HintState *hstate,
377381 Query *parse, const char *str);
378382 static Hint *SetHintCreate(const char *hint_str, const char *keyword,
379383 HintKeyword hint_keyword);
380384 static void SetHintDelete(SetHint *hint);
381-static void SetHintDesc(SetHint *hint, StringInfo buf);
385+static void SetHintDesc(SetHint *hint, StringInfo buf, bool nolf);
382386 static int SetHintCmp(const SetHint *a, const SetHint *b);
383387 static const char *SetHintParse(SetHint *hint, HintState *hstate, Query *parse,
384388 const char *str);
385389 static Hint *RowsHintCreate(const char *hint_str, const char *keyword,
386390 HintKeyword hint_keyword);
387391 static void RowsHintDelete(RowsHint *hint);
388-static void RowsHintDesc(RowsHint *hint, StringInfo buf);
392+static void RowsHintDesc(RowsHint *hint, StringInfo buf, bool nolf);
389393 static int RowsHintCmp(const RowsHint *a, const RowsHint *b);
390394 static const char *RowsHintParse(RowsHint *hint, HintState *hstate,
391395 Query *parse, const char *str);
@@ -426,10 +430,11 @@ static void pg_hint_plan_plpgsql_stmt_end(PLpgSQL_execstate *estate,
426430
427431 /* GUC variables */
428432 static bool pg_hint_plan_enable_hint = true;
429-static bool pg_hint_plan_debug_print = false;
430-static int pg_hint_plan_parse_messages = INFO;
433+static int debug_level = 0;
434+static int pg_hint_plan_message_level = INFO;
431435 /* Default is off, to keep backward compatibility. */
432436 static bool pg_hint_plan_enable_hint_table = false;
437+static bool hidestmt = false;
433438
434439 static const struct config_enum_entry parse_messages_level_options[] = {
435440 {"debug", DEBUG2, true},
@@ -450,6 +455,22 @@ static const struct config_enum_entry parse_messages_level_options[] = {
450455 {NULL, 0, false}
451456 };
452457
458+static const struct config_enum_entry parse_debug_level_options[] = {
459+ {"off", 0, false},
460+ {"on", 1, false},
461+ {"detailed", 2, false},
462+ {"verbose", 3, false},
463+ {"0", 0, true},
464+ {"1", 1, true},
465+ {"2", 2, true},
466+ {"3", 3, true},
467+ {"no", 0, true},
468+ {"yes", 1, true},
469+ {"false", 0, true},
470+ {"true", 1, true},
471+ {NULL, 0, false}
472+};
473+
453474 /* Saved hook values in case of unload */
454475 static ProcessUtility_hook_type prev_ProcessUtility = NULL;
455476 static planner_hook_type prev_planner = NULL;
@@ -537,12 +558,13 @@ _PG_init(void)
537558 NULL,
538559 NULL);
539560
540- DefineCustomBoolVariable("pg_hint_plan.debug_print",
561+ DefineCustomEnumVariable("pg_hint_plan.debug_print",
541562 "Logs results of hint parsing.",
542563 NULL,
543- &pg_hint_plan_debug_print,
544- false,
545- PGC_USERSET,
564+ &debug_level,
565+ 0,
566+ parse_debug_level_options,
567+ PGC_USERSET,
546568 0,
547569 NULL,
548570 NULL,
@@ -551,7 +573,19 @@ _PG_init(void)
551573 DefineCustomEnumVariable("pg_hint_plan.parse_messages",
552574 "Message level of parse errors.",
553575 NULL,
554- &pg_hint_plan_parse_messages,
576+ &pg_hint_plan_message_level,
577+ INFO,
578+ parse_messages_level_options,
579+ PGC_USERSET,
580+ 0,
581+ NULL,
582+ NULL,
583+ NULL);
584+
585+ DefineCustomEnumVariable("pg_hint_plan.message_level",
586+ "Message level of debug messages.",
587+ NULL,
588+ &pg_hint_plan_message_level,
555589 INFO,
556590 parse_messages_level_options,
557591 PGC_USERSET,
@@ -890,7 +924,7 @@ quote_value(StringInfo buf, const char *value)
890924 }
891925
892926 static void
893-ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf)
927+ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf, bool nolf)
894928 {
895929 ListCell *l;
896930
@@ -904,11 +938,13 @@ ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf)
904938 quote_value(buf, (char *) lfirst(l));
905939 }
906940 }
907- appendStringInfoString(buf, ")\n");
941+ appendStringInfoString(buf, ")");
942+ if (!nolf)
943+ appendStringInfoChar(buf, '\n');
908944 }
909945
910946 static void
911-JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf)
947+JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf, bool nolf)
912948 {
913949 int i;
914950
@@ -922,7 +958,9 @@ JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf)
922958 quote_value(buf, hint->relnames[i]);
923959 }
924960 }
925- appendStringInfoString(buf, ")\n");
961+ appendStringInfoString(buf, ")");
962+ if (!nolf)
963+ appendStringInfoChar(buf, '\n');
926964
927965 }
928966
@@ -954,7 +992,7 @@ OuterInnerDesc(OuterInnerRels *outer_inner, StringInfo buf)
954992 }
955993
956994 static void
957-LeadingHintDesc(LeadingHint *hint, StringInfo buf)
995+LeadingHintDesc(LeadingHint *hint, StringInfo buf, bool nolf)
958996 {
959997 appendStringInfo(buf, "%s(", HINT_LEADING);
960998 if (hint->outer_inner == NULL)
@@ -977,11 +1015,13 @@ LeadingHintDesc(LeadingHint *hint, StringInfo buf)
9771015 else
9781016 OuterInnerDesc(hint->outer_inner, buf);
9791017
980- appendStringInfoString(buf, ")\n");
1018+ appendStringInfoString(buf, ")");
1019+ if (!nolf)
1020+ appendStringInfoChar(buf, '\n');
9811021 }
9821022
9831023 static void
984-SetHintDesc(SetHint *hint, StringInfo buf)
1024+SetHintDesc(SetHint *hint, StringInfo buf, bool nolf)
9851025 {
9861026 bool is_first = true;
9871027 ListCell *l;
@@ -996,11 +1036,13 @@ SetHintDesc(SetHint *hint, StringInfo buf)
9961036
9971037 quote_value(buf, (char *) lfirst(l));
9981038 }
999- appendStringInfo(buf, ")\n");
1039+ appendStringInfo(buf, ")");
1040+ if (!nolf)
1041+ appendStringInfoChar(buf, '\n');
10001042 }
10011043
10021044 static void
1003-RowsHintDesc(RowsHint *hint, StringInfo buf)
1045+RowsHintDesc(RowsHint *hint, StringInfo buf, bool nolf)
10041046 {
10051047 int i;
10061048
@@ -1015,8 +1057,9 @@ RowsHintDesc(RowsHint *hint, StringInfo buf)
10151057 }
10161058 }
10171059 appendStringInfo(buf, " %s", hint->rows_str);
1018- appendStringInfoString(buf, ")\n");
1019-
1060+ appendStringInfoString(buf, ")");
1061+ if (!nolf)
1062+ appendStringInfoChar(buf, '\n');
10201063 }
10211064
10221065 /*
@@ -1025,18 +1068,26 @@ RowsHintDesc(RowsHint *hint, StringInfo buf)
10251068 */
10261069 static void
10271070 desc_hint_in_state(HintState *hstate, StringInfo buf, const char *title,
1028- HintStatus state)
1071+ HintStatus state, bool nolf)
10291072 {
1030- int i;
1073+ int i, nshown;
10311074
1032- appendStringInfo(buf, "%s:\n", title);
1075+ appendStringInfo(buf, "%s:", title);
1076+ if (!nolf)
1077+ appendStringInfoChar(buf, '\n');
1078+
1079+ nshown = 0;
10331080 for (i = 0; i < hstate->nall_hints; i++)
10341081 {
10351082 if (hstate->all_hints[i]->state != state)
10361083 continue;
10371084
1038- hstate->all_hints[i]->desc_func(hstate->all_hints[i], buf);
1085+ hstate->all_hints[i]->desc_func(hstate->all_hints[i], buf, nolf);
1086+ nshown++;
10391087 }
1088+
1089+ if (nolf && nshown == 0)
1090+ appendStringInfoString(buf, "(none)");
10401091 }
10411092
10421093 /*
@@ -1056,16 +1107,43 @@ HintStateDump(HintState *hstate)
10561107 initStringInfo(&buf);
10571108
10581109 appendStringInfoString(&buf, "pg_hint_plan:\n");
1059- desc_hint_in_state(hstate, &buf, "used hint", HINT_STATE_USED);
1060- desc_hint_in_state(hstate, &buf, "not used hint", HINT_STATE_NOTUSED);
1061- desc_hint_in_state(hstate, &buf, "duplication hint", HINT_STATE_DUPLICATION);
1062- desc_hint_in_state(hstate, &buf, "error hint", HINT_STATE_ERROR);
1110+ desc_hint_in_state(hstate, &buf, "used hint", HINT_STATE_USED, false);
1111+ desc_hint_in_state(hstate, &buf, "not used hint", HINT_STATE_NOTUSED, false);
1112+ desc_hint_in_state(hstate, &buf, "duplication hint", HINT_STATE_DUPLICATION, false);
1113+ desc_hint_in_state(hstate, &buf, "error hint", HINT_STATE_ERROR, false);
10631114
10641115 elog(LOG, "%s", buf.data);
10651116
10661117 pfree(buf.data);
10671118 }
10681119
1120+static void
1121+HintStateDump2(HintState *hstate)
1122+{
1123+ StringInfoData buf;
1124+
1125+ if (!hstate)
1126+ {
1127+ elog(pg_hint_plan_message_level,
1128+ "pg_hint_plan[qno=0x%x]: HintStateDump:\nno hint", qno);
1129+ return;
1130+ }
1131+
1132+ initStringInfo(&buf);
1133+ appendStringInfo(&buf, "pg_hint_plan[qno=0x%x]: HintStateDump: ", qno);
1134+ desc_hint_in_state(hstate, &buf, "{used hints", HINT_STATE_USED, true);
1135+ desc_hint_in_state(hstate, &buf, "}, {not used hints", HINT_STATE_NOTUSED, true);
1136+ desc_hint_in_state(hstate, &buf, "}, {duplicate hints", HINT_STATE_DUPLICATION, true);
1137+ desc_hint_in_state(hstate, &buf, "}, {error hints", HINT_STATE_ERROR, true);
1138+ appendStringInfoChar(&buf, '}');
1139+
1140+ ereport(pg_hint_plan_message_level,
1141+ (errhidestmt(true),
1142+ errmsg("%s", buf.data)));
1143+
1144+ pfree(buf.data);
1145+}
1146+
10691147 /*
10701148 * compare functions
10711149 */
@@ -2142,10 +2220,12 @@ set_config_option_wrapper(const char *name, const char *value,
21422220 errdata = CopyErrorData();
21432221 FlushErrorState();
21442222
2145- ereport(elevel, (errcode(errdata->sqlerrcode),
2146- errmsg("%s", errdata->message),
2147- errdata->detail ? errdetail("%s", errdata->detail) : 0,
2148- errdata->hint ? errhint("%s", errdata->hint) : 0));
2223+ ereport(elevel,
2224+ (errcode(errdata->sqlerrcode),
2225+ errhidestmt(hidestmt),
2226+ errmsg("%s", errdata->message),
2227+ errdata->detail ? errdetail("%s", errdata->detail) : 0,
2228+ errdata->hint ? errhint("%s", errdata->hint) : 0));
21492229 FreeErrorData(errdata);
21502230 }
21512231 PG_END_TRY();
@@ -2171,7 +2251,7 @@ set_config_options(SetHint **options, int noptions, GucContext context)
21712251
21722252 result = set_config_option_wrapper(hint->name, hint->value, context,
21732253 PGC_S_SESSION, GUC_ACTION_SAVE, true,
2174- pg_hint_plan_parse_messages);
2254+ pg_hint_plan_message_level);
21752255 if (result != 0)
21762256 hint->base.state = HINT_STATE_USED;
21772257 else
@@ -2239,6 +2319,10 @@ pg_hint_plan_ProcessUtility(Node *parsetree, const char *queryString,
22392319 */
22402320 if (!pg_hint_plan_enable_hint || nested_level > 0)
22412321 {
2322+ if (debug_level > 1)
2323+ ereport(pg_hint_plan_message_level,
2324+ (errmsg ("pg_hint_plan: ProcessUtility:"
2325+ " pg_hint_plan.enable_hint = off")));
22422326 if (prev_ProcessUtility)
22432327 (*prev_ProcessUtility) (parsetree, queryString, params,
22442328 isTopLevel, dest, completionTag);
@@ -2303,6 +2387,11 @@ pg_hint_plan_ProcessUtility(Node *parsetree, const char *queryString,
23032387
23042388 if (stmt_name)
23052389 {
2390+ if (debug_level > 1)
2391+ ereport(pg_hint_plan_message_level,
2392+ (errmsg ("pg_hint_plan: ProcessUtility:"
2393+ " stmt_name = \"%s\", statement=\"%s\"",
2394+ stmt_name, queryString)));
23062395 PG_TRY();
23072396 {
23082397 if (prev_ProcessUtility)
@@ -2377,6 +2466,13 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
23772466 int save_nestlevel;
23782467 PlannedStmt *result;
23792468 HintState *hstate;
2469+ char msgstr[1024];
2470+
2471+ qnostr[0] = 0;
2472+ strcpy(msgstr, "");
2473+ if (debug_level > 1)
2474+ snprintf(qnostr, sizeof(qnostr), "[qno=0x%x]", qno++);
2475+ hidestmt = false;
23802476
23812477 /*
23822478 * Use standard planner if pg_hint_plan is disabled or current nesting
@@ -2384,7 +2480,16 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
23842480 * plan with current_hint if any, so set it to NULL.
23852481 */
23862482 if (!pg_hint_plan_enable_hint || nested_level > 0)
2483+ {
2484+ if (debug_level > 1)
2485+ elog(pg_hint_plan_message_level,
2486+ "pg_hint_plan%s: planner: enable_hint=%d,"
2487+ " nested_level=%d",
2488+ qnostr, pg_hint_plan_enable_hint, nested_level);
2489+ hidestmt = true;
2490+
23872491 goto standard_planner_proc;
2492+ }
23882493
23892494 /* Create hint struct from client-supplied query string. */
23902495 query = get_query_string();
@@ -2429,12 +2534,41 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
24292534 &query_len,
24302535 GetDatabaseEncoding());
24312536 hints = get_hints_from_table(norm_query, application_name);
2432- elog(DEBUG1,
2433- "pg_hint_plan: get_hints_from_table [%s][%s]=>[%s]",
2434- norm_query, application_name, hints ? hints : "(none)");
2537+ if (debug_level > 1)
2538+ {
2539+ if (hints)
2540+ snprintf(msgstr, 1024, "hints from table: \"%s\":"
2541+ " normalzed_query=\"%s\", application name =\"%s\"",
2542+ hints, norm_query, application_name);
2543+ else
2544+ {
2545+ ereport(pg_hint_plan_message_level,
2546+ (errhidestmt(hidestmt),
2547+ errmsg("pg_hint_plan%s:"
2548+ " no match found in table:"
2549+ " application name = \"%s\","
2550+ " normalzed_query=\"%s\"",
2551+ qnostr, application_name, norm_query)));
2552+ hidestmt = true;
2553+ }
2554+ }
24352555 }
24362556 if (hints == NULL)
2557+ {
24372558 hints = get_hints_from_comment(query);
2559+
2560+ if (debug_level > 1)
2561+ {
2562+ snprintf(msgstr, 1024, "hints in comment=\"%s\"",
2563+ hints ? hints : "(none)");
2564+ if (debug_level > 2 ||
2565+ stmt_name || strcmp(query, debug_query_string))
2566+ snprintf(msgstr + strlen(msgstr), 1024- strlen(msgstr),
2567+ ", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2568+ stmt_name, query, debug_query_string);
2569+ }
2570+ }
2571+
24382572 hstate = create_hintstate(parse, hints);
24392573
24402574 /*
@@ -2472,6 +2606,14 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
24722606 if (enable_hashjoin)
24732607 current_hint->init_join_mask |= ENABLE_HASHJOIN;
24742608
2609+ if (debug_level > 1)
2610+ {
2611+ ereport(pg_hint_plan_message_level,
2612+ (errhidestmt(hidestmt),
2613+ errmsg("pg_hint_plan%s: planner: %s",
2614+ qnostr, msgstr)));
2615+ hidestmt = true;
2616+ }
24752617 /*
24762618 * Use PG_TRY mechanism to recover GUC parameters and current_hint to the
24772619 * state when this planner started when error occurred in planner.
@@ -2496,8 +2638,10 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
24962638 PG_END_TRY();
24972639
24982640 /* Print hint in debug mode. */
2499- if (pg_hint_plan_debug_print)
2641+ if (debug_level == 1)
25002642 HintStateDump(current_hint);
2643+ else if (debug_level == 2)
2644+ HintStateDump2(current_hint);
25012645
25022646 /*
25032647 * Rollback changes of GUC parameters, and pop current hint context from
@@ -2509,6 +2653,14 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
25092653 return result;
25102654
25112655 standard_planner_proc:
2656+ if (debug_level > 1)
2657+ {
2658+ ereport(pg_hint_plan_message_level,
2659+ (errhidestmt(hidestmt),
2660+ errmsg("pg_hint_plan%s: planner: no valid hint (%s)",
2661+ qnostr, msgstr)));
2662+ hidestmt = true;
2663+ }
25122664 current_hint = NULL;
25132665 if (prev_planner)
25142666 return (*prev_planner) (parse, cursorOptions, boundParams);
@@ -2615,7 +2767,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
26152767 * other than it.
26162768 */
26172769 prev = NULL;
2618- if (pg_hint_plan_debug_print)
2770+ if (debug_level > 0)
26192771 initStringInfo(&buf);
26202772
26212773 for (cell = list_head(rel->indexlist); cell; cell = next)
@@ -2640,7 +2792,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
26402792 if (result)
26412793 {
26422794 use_index = true;
2643- if (pg_hint_plan_debug_print)
2795+ if (debug_level > 0)
26442796 {
26452797 appendStringInfoCharMacro(&buf, ' ');
26462798 quote_value(&buf, indexname);
@@ -2799,7 +2951,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
27992951 use_index = true;
28002952
28012953 /* to log the candidate of index */
2802- if (pg_hint_plan_debug_print)
2954+ if (debug_level > 0)
28032955 {
28042956 appendStringInfoCharMacro(&buf, ' ');
28052957 quote_value(&buf, indexname);
@@ -2817,7 +2969,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
28172969 pfree(indexname);
28182970 }
28192971
2820- if (pg_hint_plan_debug_print)
2972+ if (debug_level == 1)
28212973 {
28222974 char *relname;
28232975 StringInfoData rel_buf;
@@ -2934,8 +3086,20 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
29343086 * Do nothing if we don't have a valid hint in this context or current
29353087 * nesting depth is at SPI calls.
29363088 */
3089+
29373090 if (!current_hint || nested_level > 0)
3091+ {
3092+ if (debug_level > 1)
3093+ ereport(pg_hint_plan_message_level,
3094+ (errhidestmt(true),
3095+ errmsg ("pg_hint_plan%s: get_relation_info"
3096+ " no hint to apply: relation=%u(%s), inhparent=%d,"
3097+ " current_hint=%p, nested_level=%d",
3098+ qnostr, relationObjectId,
3099+ get_rel_name(relationObjectId),
3100+ inhparent, current_hint, nested_level)));
29383101 return;
3102+ }
29393103
29403104 /*
29413105 * We could register the parent relation of the following children here
@@ -2945,7 +3109,18 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
29453109 * called for them.
29463110 */
29473111 if (inhparent)
3112+ {
3113+ if (debug_level > 1)
3114+ ereport(pg_hint_plan_message_level,
3115+ (errhidestmt(true),
3116+ errmsg ("pg_hint_plan%s: get_relation_info"
3117+ " skipping inh parent: relation=%u(%s), inhparent=%d,"
3118+ " current_hint=%p, nested_level=%d",
3119+ qnostr, relationObjectId,
3120+ get_rel_name(relationObjectId),
3121+ inhparent, current_hint, nested_level)));
29483122 return;
3123+ }
29493124
29503125 /* Find the parent for this relation */
29513126 foreach (l, root->append_rel_list)
@@ -3036,6 +3211,16 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
30363211 relationObjectId);
30373212
30383213 /* Scan fixation status is the same to the parent. */
3214+ if (debug_level > 1)
3215+ ereport(pg_hint_plan_message_level,
3216+ (errhidestmt(true),
3217+ errmsg("pg_hint_plan%s: get_relation_info:"
3218+ " index deletion by parent hint: "
3219+ "relation=%u(%s), inhparent=%d, current_hint=%p,"
3220+ " nested_level=%d",
3221+ qnostr, relationObjectId,
3222+ get_rel_name(relationObjectId),
3223+ inhparent, current_hint, nested_level)));
30393224 return;
30403225 }
30413226
@@ -3046,10 +3231,35 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
30463231 hint->base.state = HINT_STATE_USED;
30473232
30483233 delete_indexes(hint, rel, InvalidOid);
3234+
3235+ if (debug_level > 1)
3236+ ereport(pg_hint_plan_message_level,
3237+ (errhidestmt(true),
3238+ errmsg ("pg_hint_plan%s: get_relation_info"
3239+ " index deletion:"
3240+ " relation=%u(%s), inhparent=%d, current_hint=%p,"
3241+ " nested_level=%d, scanmask=0x%x",
3242+ qnostr, relationObjectId,
3243+ get_rel_name(relationObjectId),
3244+ inhparent, current_hint, nested_level,
3245+ hint->enforce_mask)));
30493246 }
30503247 else
3248+ {
3249+ if (debug_level > 1)
3250+ ereport(pg_hint_plan_message_level,
3251+ (errhidestmt (true),
3252+ errmsg ("pg_hint_plan%s: get_relation_info"
3253+ " no hint applied:"
3254+ " relation=%u(%s), inhparent=%d, current_hint=%p,"
3255+ " nested_level=%d, scanmask=0x%x",
3256+ qnostr, relationObjectId,
3257+ get_rel_name(relationObjectId),
3258+ inhparent, current_hint, nested_level,
3259+ current_hint->init_scan_mask)));
30513260 set_scan_config_options(current_hint->init_scan_mask,
30523261 current_hint->context);
3262+ }
30533263 return;
30543264 }
30553265
旧リポジトリブラウザで表示