• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision706442a284b4555c66730009e61106ab0ca2d302 (tree)
Time2014-12-18 16:37:12
AuthorKyotaro Horiguchi <horiguchi.kyotaro@lab....>
CommiterKyotaro Horiguchi

Log Message

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.

Change Summary

Incremental Difference

--- 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
@@ -258,7 +258,7 @@ error hint:
258258
259259 /*+Set(work_mem TO "1MB")*/
260260 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
261-INFO: hint syntax error at or near "Set(work_mem TO "1MB")"
261+INFO: pg_hint_plan: hint syntax error at or near "Set(work_mem TO "1MB")"
262262 DETAIL: Set hint requires name and value of GUC parameter.
263263 LOG: pg_hint_plan:
264264 used hint:
@@ -277,7 +277,7 @@ Set(work_mem TO 1MB)
277277
278278 /*+SeqScan(t1 t2)*/
279279 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
280-INFO: hint syntax error at or near ""
280+INFO: pg_hint_plan: hint syntax error at or near ""
281281 DETAIL: SeqScan hint accepts only one relation.
282282 LOG: pg_hint_plan:
283283 used hint:
@@ -656,7 +656,7 @@ error hint:
656656
657657 /*+Leading( */
658658 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
659-INFO: hint syntax error at or near ""
659+INFO: pg_hint_plan: hint syntax error at or near ""
660660 DETAIL: Closing parenthesis is necessary.
661661 QUERY PLAN
662662 --------------------------------------------------
@@ -676,7 +676,7 @@ DETAIL: Closing parenthesis is necessary.
676676
677677 /*+Leading( )*/
678678 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
679-INFO: hint syntax error at or near "Leading( )"
679+INFO: pg_hint_plan: hint syntax error at or near "Leading( )"
680680 DETAIL: Leading hint requires at least two relations.
681681 LOG: pg_hint_plan:
682682 used hint:
@@ -703,7 +703,7 @@ Leading()
703703
704704 /*+Leading( t3 )*/
705705 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
706-INFO: hint syntax error at or near "Leading( t3 )"
706+INFO: pg_hint_plan: hint syntax error at or near "Leading( t3 )"
707707 DETAIL: Leading hint requires at least two relations.
708708 LOG: pg_hint_plan:
709709 used hint:
@@ -805,7 +805,7 @@ error hint:
805805
806806 /*+Leading(t3 t4 t1 t2 t1)*/
807807 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
808-INFO: hint syntax error at or near "Leading(t3 t4 t1 t2 t1)"
808+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t4 t1 t2 t1)"
809809 DETAIL: Relation name "t1" is duplicated.
810810 LOG: pg_hint_plan:
811811 used hint:
@@ -832,7 +832,7 @@ Leading(t3 t4 t1 t2 t1)
832832
833833 /*+Leading(t3 t4 t4)*/
834834 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
835-INFO: hint syntax error at or near "Leading(t3 t4 t4)"
835+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t4 t4)"
836836 DETAIL: Relation name "t4" is duplicated.
837837 LOG: pg_hint_plan:
838838 used hint:
@@ -4326,25 +4326,25 @@ error hint:
43264326 -- duplicate hint test
43274327 /*+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)*/
43284328 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
4329-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)"
4329+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)"
43304330 DETAIL: Conflict scan method hint.
4331-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)"
4331+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)"
43324332 DETAIL: Conflict scan method hint.
4333-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)"
4333+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)"
43344334 DETAIL: Conflict scan method hint.
4335-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)"
4335+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)"
43364336 DETAIL: Conflict scan method hint.
4337-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)"
4337+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)"
43384338 DETAIL: Conflict scan method hint.
4339-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)"
4339+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)"
43404340 DETAIL: Conflict scan method hint.
4341-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)"
4341+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)"
43424342 DETAIL: Conflict join method hint.
4343-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)"
4343+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)"
43444344 DETAIL: Conflict join method hint.
4345-INFO: hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4345+INFO: pg_hint_plan: hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
43464346 DETAIL: Conflict set hint.
4347-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)"
4347+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)"
43484348 DETAIL: Conflict leading hint.
43494349 LOG: pg_hint_plan:
43504350 used hint:
@@ -5189,7 +5189,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id
51895189
51905190 /*+NestLoop(t1 t2)*/
51915191 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5192-INFO: hint syntax error at or near "NestLoop(t1 t2)"
5192+INFO: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t2)"
51935193 DETAIL: Relation name "t1" is ambiguous.
51945194 LOG: pg_hint_plan:
51955195 used hint:
@@ -5211,7 +5211,7 @@ NestLoop(t1 t2)
52115211
52125212 /*+Leading(t1 t2 t1)*/
52135213 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5214-INFO: hint syntax error at or near "Leading(t1 t2 t1)"
5214+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1 t2 t1)"
52155215 DETAIL: Relation name "t1" is ambiguous.
52165216 LOG: pg_hint_plan:
52175217 used hint:
@@ -5454,7 +5454,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val =
54545454
54555455 /*+Leading((t1))*/
54565456 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5457-INFO: hint syntax error at or near "Leading((t1))"
5457+INFO: pg_hint_plan: hint syntax error at or near "Leading((t1))"
54585458 DETAIL: Leading hint requires two sets of relations when parentheses nests.
54595459 LOG: pg_hint_plan:
54605460 used hint:
@@ -5501,7 +5501,7 @@ error hint:
55015501
55025502 /*+Leading((t1 t2 t3))*/
55035503 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5504-INFO: hint syntax error at or near "Leading((t1 t2 t3))"
5504+INFO: pg_hint_plan: hint syntax error at or near "Leading((t1 t2 t3))"
55055505 DETAIL: Leading hint requires two sets of relations when parentheses nests.
55065506 LOG: pg_hint_plan:
55075507 used hint:
@@ -5766,7 +5766,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val =
57665766
57675767 /*+Leading(((t1 t2) t3)) Leading(((t3 t1) t2))*/
57685768 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);
5769-INFO: hint syntax error at or near "Leading(((t1 t2) t3)) Leading(((t3 t1) t2))"
5769+INFO: pg_hint_plan: hint syntax error at or near "Leading(((t1 t2) t3)) Leading(((t3 t1) t2))"
57705770 DETAIL: Conflict leading hint.
57715771 LOG: pg_hint_plan:
57725772 used hint:
@@ -8093,7 +8093,7 @@ error hint:
80938093
80948094 /*+ Rows(t1 t2 #aa) */
80958095 EXPLAIN SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id); -- ERROR
8096-INFO: hint syntax error at or near "aa"
8096+INFO: pg_hint_plan: hint syntax error at or near "aa"
80978097 DETAIL: Rows hint requires valid number as rows estimation.
80988098 LOG: pg_hint_plan:
80998099 used hint:
@@ -8112,7 +8112,7 @@ Rows(t1 t2 #aa)
81128112
81138113 /*+ Rows(t1 t2 /99) */
81148114 EXPLAIN SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id); -- ERROR
8115-INFO: hint syntax error at or near "/99"
8115+INFO: pg_hint_plan: hint syntax error at or near "/99"
81168116 DETAIL: Unrecognized rows value type notation.
81178117 LOG: pg_hint_plan:
81188118 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
@@ -276,7 +276,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 WHERE s1.t1.c1 =
276276
277277 /*+Leading(t1 t2 t3 t1)*/
278278 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;
279-INFO: hint syntax error at or near "Leading(t1 t2 t3 t1)"
279+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1 t2 t3 t1)"
280280 DETAIL: Relation name "t1" is ambiguous.
281281 LOG: pg_hint_plan:
282282 used hint:
@@ -529,7 +529,7 @@ error hint:
529529 -- No. L-1-5-2
530530 /*+Leading(t4 t2 t3 t1 t4)*/
531531 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;
532-INFO: hint syntax error at or near "Leading(t4 t2 t3 t1 t4)"
532+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t3 t1 t4)"
533533 DETAIL: Relation name "t4" is duplicated.
534534 LOG: pg_hint_plan:
535535 used hint:
@@ -557,7 +557,7 @@ Leading(t4 t2 t3 t1 t4)
557557
558558 /*+Leading(t4 t2 t3 t4)*/
559559 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;
560-INFO: hint syntax error at or near "Leading(t4 t2 t3 t4)"
560+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t3 t4)"
561561 DETAIL: Relation name "t4" is duplicated.
562562 LOG: pg_hint_plan:
563563 used hint:
@@ -586,7 +586,7 @@ Leading(t4 t2 t3 t4)
586586 -- No. L-1-5-3
587587 /*+Leading(t4 t2 t3 t1 t4 t2 t3 t1)*/
588588 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;
589-INFO: hint syntax error at or near "Leading(t4 t2 t3 t1 t4 t2 t3 t1)"
589+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t3 t1 t4 t2 t3 t1)"
590590 DETAIL: Relation name "t4" is duplicated.
591591 LOG: pg_hint_plan:
592592 used hint:
@@ -614,7 +614,7 @@ Leading(t4 t2 t3 t1 t4 t2 t3 t1)
614614
615615 /*+Leading(t4 t2 t2 t4)*/
616616 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;
617-INFO: hint syntax error at or near "Leading(t4 t2 t2 t4)"
617+INFO: pg_hint_plan: hint syntax error at or near "Leading(t4 t2 t2 t4)"
618618 DETAIL: Relation name "t2" is duplicated.
619619 LOG: pg_hint_plan:
620620 used hint:
@@ -3486,7 +3486,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
34863486
34873487 /*+Leading(v1t1 v1t1)*/
34883488 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3489-INFO: hint syntax error at or near "Leading(v1t1 v1t1)"
3489+INFO: pg_hint_plan: hint syntax error at or near "Leading(v1t1 v1t1)"
34903490 DETAIL: Relation name "v1t1" is ambiguous.
34913491 LOG: pg_hint_plan:
34923492 used hint:
@@ -3546,7 +3546,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
35463546
35473547 /*+Leading(r4t1 r4t1)*/
35483548 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3549-INFO: hint syntax error at or near "Leading(r4t1 r4t1)"
3549+INFO: pg_hint_plan: hint syntax error at or near "Leading(r4t1 r4t1)"
35503550 DETAIL: Relation name "r4t1" is ambiguous.
35513551 LOG: pg_hint_plan:
35523552 used hint:
@@ -3694,7 +3694,7 @@ error hint:
36943694
36953695 /*+ Leading(*VALUES* t3 t2 t1) */
36963696 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;
3697-INFO: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) "
3697+INFO: pg_hint_plan: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) "
36983698 DETAIL: Relation name "*VALUES*" is ambiguous.
36993699 LOG: pg_hint_plan:
37003700 used hint:
@@ -4114,7 +4114,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1
41144114 EXPLAIN (COSTS false) SELECT * FROM s1.t1
41154115 JOIN s1.t2 ON (t1.c1 = t2.c1)
41164116 JOIN s1.t3 ON (t1.c1 = t3.c1);
4117-INFO: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
4117+INFO: pg_hint_plan: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
41184118 DETAIL: Conflict leading hint.
41194119 LOG: pg_hint_plan:
41204120 used hint:
@@ -4142,9 +4142,9 @@ error hint:
41424142 EXPLAIN (COSTS false) SELECT * FROM s1.t1
41434143 JOIN s1.t2 ON (t1.c1 = t2.c1)
41444144 JOIN s1.t3 ON (t1.c1 = t3.c1);
4145-INFO: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading(t1 t2 t3)"
4145+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading(t1 t2 t3)"
41464146 DETAIL: Conflict leading hint.
4147-INFO: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
4147+INFO: pg_hint_plan: hint syntax error at or near "Leading(t2 t3 t1)Leading(t1 t2 t3)"
41484148 DETAIL: Conflict leading hint.
41494149 LOG: pg_hint_plan:
41504150 used hint:
@@ -4173,7 +4173,7 @@ error hint:
41734173 EXPLAIN (COSTS false) SELECT * FROM s1.t1
41744174 JOIN s1.t2 ON (t1.c1 = t2.c1)
41754175 JOIN s1.t3 ON (t1.c1 = t3.c1);
4176-INFO: hint syntax error at or near "Leading()"
4176+INFO: pg_hint_plan: hint syntax error at or near "Leading()"
41774177 DETAIL: Leading hint requires at least two relations.
41784178 LOG: pg_hint_plan:
41794179 used hint:
@@ -4202,9 +4202,9 @@ Leading()
42024202 EXPLAIN (COSTS false) SELECT * FROM s1.t1
42034203 JOIN s1.t2 ON (t1.c1 = t2.c1)
42044204 JOIN s1.t3 ON (t1.c1 = t3.c1);
4205-INFO: hint syntax error at or near "Leading()"
4205+INFO: pg_hint_plan: hint syntax error at or near "Leading()"
42064206 DETAIL: Leading hint requires at least two relations.
4207-INFO: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading()"
4207+INFO: pg_hint_plan: hint syntax error at or near "Leading(t3 t1 t2)Leading(t2 t3 t1)Leading()"
42084208 DETAIL: Conflict leading hint.
42094209 LOG: pg_hint_plan:
42104210 used hint:
@@ -4237,7 +4237,7 @@ Leading()
42374237 EXPLAIN (COSTS false) SELECT * FROM s1.t1
42384238 JOIN s1.t2 ON (t1.c1 = t2.c1)
42394239 JOIN s1.t3 ON (t1.c1 = t3.c1);
4240-INFO: hint syntax error at or near "Leading()"
4240+INFO: pg_hint_plan: hint syntax error at or near "Leading()"
42414241 DETAIL: Leading hint requires at least two relations.
42424242 LOG: pg_hint_plan:
42434243 used hint:
@@ -4264,7 +4264,7 @@ Leading()
42644264 EXPLAIN (COSTS false) SELECT * FROM s1.t1
42654265 JOIN s1.t2 ON (t1.c1 = t2.c1)
42664266 JOIN s1.t3 ON (t1.c1 = t3.c1);
4267-INFO: hint syntax error at or near "Leading(t1)"
4267+INFO: pg_hint_plan: hint syntax error at or near "Leading(t1)"
42684268 DETAIL: Leading hint requires at least two relations.
42694269 LOG: pg_hint_plan:
42704270 used hint:
@@ -4342,7 +4342,7 @@ error hint:
43424342 -- No. L-3-6-1
43434343 /*+Leading((t2))*/
43444344 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;
4345-INFO: hint syntax error at or near "Leading((t2))"
4345+INFO: pg_hint_plan: hint syntax error at or near "Leading((t2))"
43464346 DETAIL: Leading hint requires two sets of relations when parentheses nests.
43474347 LOG: pg_hint_plan:
43484348 used hint:
@@ -4397,7 +4397,7 @@ error hint:
43974397 -- No. L-3-6-3
43984398 /*+Leading((t2 t3 t4))*/
43994399 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;
4400-INFO: hint syntax error at or near "Leading((t2 t3 t4))"
4400+INFO: pg_hint_plan: hint syntax error at or near "Leading((t2 t3 t4))"
44014401 DETAIL: Leading hint requires two sets of relations when parentheses nests.
44024402 LOG: pg_hint_plan:
44034403 used hint:
@@ -4454,7 +4454,7 @@ error hint:
44544454 -- No. L-3-6-5
44554455 /*+Leading((((t1 t3) t4) t2)))*/
44564456 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;
4457-INFO: hint syntax error at or near ")"
4457+INFO: pg_hint_plan: hint syntax error at or near ")"
44584458 DETAIL: Unrecognized hint keyword ")".
44594459 LOG: pg_hint_plan:
44604460 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
@@ -481,7 +481,7 @@ error hint:
481481 \o results/R_1-7-1.out.log
482482 /*+Rows(t1 #1)*/
483483 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
484-INFO: hint syntax error at or near ""
484+INFO: pg_hint_plan: hint syntax error at or near ""
485485 DETAIL: Rows hint requires at least two relations.
486486 LOG: pg_hint_plan:
487487 used hint:
@@ -497,7 +497,7 @@ Rows(t1 #1)
497497 \o results/R_1-7-2.out.log
498498 /*+Rows(t1 t2 1)*/
499499 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
500-INFO: hint syntax error at or near "1"
500+INFO: pg_hint_plan: hint syntax error at or near "1"
501501 DETAIL: Unrecognized rows value type notation.
502502 LOG: pg_hint_plan:
503503 used hint:
@@ -513,7 +513,7 @@ Rows(t1 t2 1)
513513 \o results/R_1-7-3.out.log
514514 /*+Rows(t1 t2 #notrows)*/
515515 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
516-INFO: hint syntax error at or near "notrows"
516+INFO: pg_hint_plan: hint syntax error at or near "notrows"
517517 DETAIL: Rows hint requires valid number as rows estimation.
518518 LOG: pg_hint_plan:
519519 used hint:
@@ -1963,7 +1963,7 @@ error hint:
19631963 \o results/R_2-3-4.out.log
19641964 /*+HashJoin(v1t1 v1t1)*/
19651965 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
1966-INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)"
1966+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
19671967 DETAIL: Relation name "v1t1" is ambiguous.
19681968 LOG: pg_hint_plan:
19691969 used hint:
@@ -1974,9 +1974,9 @@ HashJoin(v1t1 v1t1)
19741974
19751975 /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/
19761976 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
1977-INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
1977+INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
19781978 DETAIL: Relation name "v1t1" is ambiguous.
1979-INFO: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
1979+INFO: pg_hint_plan: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
19801980 DETAIL: Relation name "v1t1" is ambiguous.
19811981 LOG: pg_hint_plan:
19821982 used hint:
@@ -2017,11 +2017,11 @@ error hint:
20172017 \o results/R_2-3-6.out.log
20182018 /*+RowsHashJoin(r4t1 r4t1)*/
20192019 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
2020-INFO: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
2020+INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
20212021 DETAIL: Unrecognized hint keyword "RowsHashJoin".
20222022 /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/
20232023 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
2024-INFO: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
2024+INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
20252025 DETAIL: Unrecognized hint keyword "RowsHashJoin".
20262026 \o
20272027 \! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_2-3-6.out.log > results/R_2-3-6.out
@@ -2098,11 +2098,11 @@ error hint:
20982098
20992099 /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
21002100 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;
2101-INFO: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
2101+INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
21022102 DETAIL: Relation name "*VALUES*" is ambiguous.
2103-INFO: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
2103+INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
21042104 DETAIL: Relation name "*VALUES*" is ambiguous.
2105-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)"
2105+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)"
21062106 DETAIL: Relation name "*VALUES*" is ambiguous.
21072107 LOG: pg_hint_plan:
21082108 used hint:
@@ -2342,7 +2342,7 @@ error hint:
23422342 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23432343 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/
23442344 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2345-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
2345+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
23462346 DETAIL: Conflict rows hint.
23472347 LOG: pg_hint_plan:
23482348 used hint:
@@ -2360,9 +2360,9 @@ error hint:
23602360 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23612361 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/
23622362 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2363-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
2363+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
23642364 DETAIL: Conflict rows hint.
2365-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
2365+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
23662366 DETAIL: Conflict rows hint.
23672367 LOG: pg_hint_plan:
23682368 used hint:
@@ -2381,7 +2381,7 @@ error hint:
23812381 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23822382 /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/
23832383 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2384-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
2384+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
23852385 DETAIL: Conflict rows hint.
23862386 LOG: pg_hint_plan:
23872387 used hint:
@@ -2399,9 +2399,9 @@ error hint:
23992399 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
24002400 /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/
24012401 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2402-INFO: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
2402+INFO: pg_hint_plan: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
24032403 DETAIL: Conflict rows hint.
2404-INFO: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
2404+INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
24052405 DETAIL: Conflict rows hint.
24062406 LOG: pg_hint_plan:
24072407 used hint:
--- a/expected/ut-S.out
+++ b/expected/ut-S.out
@@ -3037,7 +3037,7 @@ EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4),
30373037
30383038 /*+SeqScan(t1 t2)*/
30393039 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;
3040-INFO: hint syntax error at or near ""
3040+INFO: pg_hint_plan: hint syntax error at or near ""
30413041 DETAIL: SeqScan hint accepts only one relation.
30423042 LOG: pg_hint_plan:
30433043 used hint:
@@ -5332,7 +5332,7 @@ error hint:
53325332 -- No. S-3-12-1
53335333 /*+IndexScan(ti1) BitmapScan(ti1)*/
53345334 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5335-INFO: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
5335+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
53365336 DETAIL: Conflict scan method hint.
53375337 LOG: pg_hint_plan:
53385338 used hint:
@@ -5354,7 +5354,7 @@ error hint:
53545354 -- No. S-3-12-2
53555355 /*+IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/
53565356 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5357-INFO: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
5357+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
53585358 DETAIL: Conflict scan method hint.
53595359 LOG: available indexes for BitmapScan(ti1): ti1_btree
53605360 LOG: pg_hint_plan:
@@ -5377,9 +5377,9 @@ error hint:
53775377 -- No. S-3-12-3
53785378 /*+BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)*/
53795379 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5380-INFO: hint syntax error at or near "BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)"
5380+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)"
53815381 DETAIL: Conflict scan method hint.
5382-INFO: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
5382+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1) BitmapScan(ti1)"
53835383 DETAIL: Conflict scan method hint.
53845384 LOG: pg_hint_plan:
53855385 used hint:
@@ -5402,9 +5402,9 @@ error hint:
54025402 -- No. S-3-12-4
54035403 /*+BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/
54045404 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5405-INFO: hint syntax error at or near "BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
5405+INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
54065406 DETAIL: Conflict scan method hint.
5407-INFO: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
5407+INFO: pg_hint_plan: hint syntax error at or near "IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)"
54085408 DETAIL: Conflict scan method hint.
54095409 LOG: available indexes for BitmapScan(ti1): ti1_btree
54105410 LOG: pg_hint_plan:
@@ -5447,7 +5447,7 @@ error hint:
54475447 -- No. S-3-13-2
54485448 /*+SeqScan(ti1 ti1_pkey)*/
54495449 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5450-INFO: hint syntax error at or near ""
5450+INFO: pg_hint_plan: hint syntax error at or near ""
54515451 DETAIL: SeqScan hint accepts only one relation.
54525452 LOG: pg_hint_plan:
54535453 used hint:
@@ -5466,7 +5466,7 @@ SeqScan(ti1 ti1_pkey)
54665466 -- No. S-3-13-3
54675467 /*+SeqScan(ti1 ti1_pkey ti1_btree)*/
54685468 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5469-INFO: hint syntax error at or near ""
5469+INFO: pg_hint_plan: hint syntax error at or near ""
54705470 DETAIL: SeqScan hint accepts only one relation.
54715471 LOG: pg_hint_plan:
54725472 used hint:
@@ -5614,7 +5614,7 @@ error hint:
56145614 -- No. S-3-13-11
56155615 /*+TidScan(ti1 ti1_pkey)*/
56165616 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5617-INFO: hint syntax error at or near ""
5617+INFO: pg_hint_plan: hint syntax error at or near ""
56185618 DETAIL: TidScan hint accepts only one relation.
56195619 LOG: pg_hint_plan:
56205620 used hint:
@@ -5633,7 +5633,7 @@ TidScan(ti1 ti1_pkey)
56335633 -- No. S-3-13-12
56345634 /*+TidScan(ti1 ti1_pkey ti1_btree)*/
56355635 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5636-INFO: hint syntax error at or near ""
5636+INFO: pg_hint_plan: hint syntax error at or near ""
56375637 DETAIL: TidScan hint accepts only one relation.
56385638 LOG: pg_hint_plan:
56395639 used hint:
@@ -5669,7 +5669,7 @@ error hint:
56695669 -- No. S-3-13-14
56705670 /*+NoSeqScan(ti1 ti1_pkey)*/
56715671 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5672-INFO: hint syntax error at or near ""
5672+INFO: pg_hint_plan: hint syntax error at or near ""
56735673 DETAIL: NoSeqScan hint accepts only one relation.
56745674 LOG: pg_hint_plan:
56755675 used hint:
@@ -5688,7 +5688,7 @@ NoSeqScan(ti1 ti1_pkey)
56885688 -- No. S-3-13-15
56895689 /*+NoSeqScan(ti1 ti1_pkey ti1_btree)*/
56905690 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5691-INFO: hint syntax error at or near ""
5691+INFO: pg_hint_plan: hint syntax error at or near ""
56925692 DETAIL: NoSeqScan hint accepts only one relation.
56935693 LOG: pg_hint_plan:
56945694 used hint:
@@ -5724,7 +5724,7 @@ error hint:
57245724 -- No. S-3-13-17
57255725 /*+NoIndexScan(ti1 ti1_pkey)*/
57265726 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5727-INFO: hint syntax error at or near ""
5727+INFO: pg_hint_plan: hint syntax error at or near ""
57285728 DETAIL: NoIndexScan hint accepts only one relation.
57295729 LOG: pg_hint_plan:
57305730 used hint:
@@ -5743,7 +5743,7 @@ NoIndexScan(ti1 ti1_pkey)
57435743 -- No. S-3-13-18
57445744 /*+NoIndexScan(ti1 ti1_pkey ti1_btree)*/
57455745 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5746-INFO: hint syntax error at or near ""
5746+INFO: pg_hint_plan: hint syntax error at or near ""
57475747 DETAIL: NoIndexScan hint accepts only one relation.
57485748 LOG: pg_hint_plan:
57495749 used hint:
@@ -5779,7 +5779,7 @@ error hint:
57795779 -- No. S-3-13-20
57805780 /*+NoBitmapScan(ti1 ti1_pkey)*/
57815781 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5782-INFO: hint syntax error at or near ""
5782+INFO: pg_hint_plan: hint syntax error at or near ""
57835783 DETAIL: NoBitmapScan hint accepts only one relation.
57845784 LOG: pg_hint_plan:
57855785 used hint:
@@ -5798,7 +5798,7 @@ NoBitmapScan(ti1 ti1_pkey)
57985798 -- No. S-3-13-21
57995799 /*+NoBitmapScan(ti1 ti1_pkey ti1_btree)*/
58005800 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5801-INFO: hint syntax error at or near ""
5801+INFO: pg_hint_plan: hint syntax error at or near ""
58025802 DETAIL: NoBitmapScan hint accepts only one relation.
58035803 LOG: pg_hint_plan:
58045804 used hint:
@@ -5834,7 +5834,7 @@ error hint:
58345834 -- No. S-3-13-23
58355835 /*+NoTidScan(ti1 ti1_pkey)*/
58365836 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5837-INFO: hint syntax error at or near ""
5837+INFO: pg_hint_plan: hint syntax error at or near ""
58385838 DETAIL: NoTidScan hint accepts only one relation.
58395839 LOG: pg_hint_plan:
58405840 used hint:
@@ -5853,7 +5853,7 @@ NoTidScan(ti1 ti1_pkey)
58535853 -- No. S-3-13-24
58545854 /*+NoTidScan(ti1 ti1_pkey ti1_btree)*/
58555855 EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c1 = 1 AND ctid = '(1,1)';
5856-INFO: hint syntax error at or near ""
5856+INFO: pg_hint_plan: hint syntax error at or near ""
58575857 DETAIL: NoTidScan hint accepts only one relation.
58585858 LOG: pg_hint_plan:
58595859 used hint:
@@ -5938,7 +5938,7 @@ error hint:
59385938 -- No. S-3-13-29
59395939 /*+NoIndexOnlyScan(ti1 ti1_pkey)*/
59405940 EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1;
5941-INFO: hint syntax error at or near ""
5941+INFO: pg_hint_plan: hint syntax error at or near ""
59425942 DETAIL: NoIndexOnlyScan hint accepts only one relation.
59435943 LOG: pg_hint_plan:
59445944 used hint:
@@ -5956,7 +5956,7 @@ NoIndexOnlyScan(ti1 ti1_pkey)
59565956 -- No. S-3-13-30
59575957 /*+NoIndexOnlyScan(ti1 ti1_pkey ti1_btree)*/
59585958 EXPLAIN (COSTS false) SELECT c1 FROM s1.ti1 WHERE c1 = 1;
5959-INFO: hint syntax error at or near ""
5959+INFO: pg_hint_plan: hint syntax error at or near ""
59605960 DETAIL: NoIndexOnlyScan hint accepts only one relation.
59615961 LOG: pg_hint_plan:
59625962 used hint:
--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -93,8 +93,9 @@ PG_MODULE_MAGIC;
9393 #define HINT_ARRAY_DEFAULT_INITSIZE 8
9494
9595 #define hint_ereport(str, detail) \
96- ereport(pg_hint_plan_parse_messages, \
97- (errmsg("hint syntax error at or near \"%s\"", (str)), \
96+ ereport(pg_hint_plan_message_level, \
97+ (errhidestmt(hidestmt), \
98+ errmsg("pg_hint_plan%s: hint syntax error at or near \"%s\"", qnostr, (str)), \
9899 errdetail detail))
99100
100101 #define skip_space(str) \
@@ -159,7 +160,7 @@ typedef Hint *(*HintCreateFunction) (const char *hint_str,
159160 const char *keyword,
160161 HintKeyword hint_keyword);
161162 typedef void (*HintDeleteFunction) (Hint *hint);
162-typedef void (*HintDescFunction) (Hint *hint, StringInfo buf);
163+typedef void (*HintDescFunction) (Hint *hint, StringInfo buf, bool nolf);
163164 typedef int (*HintCmpFunction) (const Hint *a, const Hint *b);
164165 typedef const char *(*HintParseFunction) (Hint *hint, HintState *hstate,
165166 Query *parse, const char *str);
@@ -196,6 +197,9 @@ typedef enum HintStatus
196197 #define hint_state_enabled(hint) ((hint)->base.state == HINT_STATE_NOTUSED || \
197198 (hint)->base.state == HINT_STATE_USED)
198199
200+static unsigned int qno = 0;
201+static char qnostr[32];
202+
199203 /* common data for all hints. */
200204 struct Hint
201205 {
@@ -360,35 +364,35 @@ static RelOptInfo *pg_hint_plan_join_search(PlannerInfo *root,
360364 static Hint *ScanMethodHintCreate(const char *hint_str, const char *keyword,
361365 HintKeyword hint_keyword);
362366 static void ScanMethodHintDelete(ScanMethodHint *hint);
363-static void ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf);
367+static void ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf, bool nolf);
364368 static int ScanMethodHintCmp(const ScanMethodHint *a, const ScanMethodHint *b);
365369 static const char *ScanMethodHintParse(ScanMethodHint *hint, HintState *hstate,
366370 Query *parse, const char *str);
367371 static Hint *JoinMethodHintCreate(const char *hint_str, const char *keyword,
368372 HintKeyword hint_keyword);
369373 static void JoinMethodHintDelete(JoinMethodHint *hint);
370-static void JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf);
374+static void JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf, bool nolf);
371375 static int JoinMethodHintCmp(const JoinMethodHint *a, const JoinMethodHint *b);
372376 static const char *JoinMethodHintParse(JoinMethodHint *hint, HintState *hstate,
373377 Query *parse, const char *str);
374378 static Hint *LeadingHintCreate(const char *hint_str, const char *keyword,
375379 HintKeyword hint_keyword);
376380 static void LeadingHintDelete(LeadingHint *hint);
377-static void LeadingHintDesc(LeadingHint *hint, StringInfo buf);
381+static void LeadingHintDesc(LeadingHint *hint, StringInfo buf, bool nolf);
378382 static int LeadingHintCmp(const LeadingHint *a, const LeadingHint *b);
379383 static const char *LeadingHintParse(LeadingHint *hint, HintState *hstate,
380384 Query *parse, const char *str);
381385 static Hint *SetHintCreate(const char *hint_str, const char *keyword,
382386 HintKeyword hint_keyword);
383387 static void SetHintDelete(SetHint *hint);
384-static void SetHintDesc(SetHint *hint, StringInfo buf);
388+static void SetHintDesc(SetHint *hint, StringInfo buf, bool nolf);
385389 static int SetHintCmp(const SetHint *a, const SetHint *b);
386390 static const char *SetHintParse(SetHint *hint, HintState *hstate, Query *parse,
387391 const char *str);
388392 static Hint *RowsHintCreate(const char *hint_str, const char *keyword,
389393 HintKeyword hint_keyword);
390394 static void RowsHintDelete(RowsHint *hint);
391-static void RowsHintDesc(RowsHint *hint, StringInfo buf);
395+static void RowsHintDesc(RowsHint *hint, StringInfo buf, bool nolf);
392396 static int RowsHintCmp(const RowsHint *a, const RowsHint *b);
393397 static const char *RowsHintParse(RowsHint *hint, HintState *hstate,
394398 Query *parse, const char *str);
@@ -429,10 +433,11 @@ static void pg_hint_plan_plpgsql_stmt_end(PLpgSQL_execstate *estate,
429433
430434 /* GUC variables */
431435 static bool pg_hint_plan_enable_hint = true;
432-static bool pg_hint_plan_debug_print = false;
433-static int pg_hint_plan_parse_messages = INFO;
436+static int debug_level = 0;
437+static int pg_hint_plan_message_level = INFO;
434438 /* Default is off, to keep backward compatibility. */
435439 static bool pg_hint_plan_enable_hint_table = false;
440+static bool hidestmt = false;
436441
437442 static const struct config_enum_entry parse_messages_level_options[] = {
438443 {"debug", DEBUG2, true},
@@ -453,6 +458,22 @@ static const struct config_enum_entry parse_messages_level_options[] = {
453458 {NULL, 0, false}
454459 };
455460
461+static const struct config_enum_entry parse_debug_level_options[] = {
462+ {"off", 0, false},
463+ {"on", 1, false},
464+ {"detailed", 2, false},
465+ {"verbose", 3, false},
466+ {"0", 0, true},
467+ {"1", 1, true},
468+ {"2", 2, true},
469+ {"3", 3, true},
470+ {"no", 0, true},
471+ {"yes", 1, true},
472+ {"false", 0, true},
473+ {"true", 1, true},
474+ {NULL, 0, false}
475+};
476+
456477 /* Saved hook values in case of unload */
457478 static ProcessUtility_hook_type prev_ProcessUtility = NULL;
458479 static planner_hook_type prev_planner = NULL;
@@ -534,17 +555,18 @@ _PG_init(void)
534555 NULL,
535556 &pg_hint_plan_enable_hint,
536557 true,
537- PGC_USERSET,
558+ PGC_USERSET,
538559 0,
539560 NULL,
540561 NULL,
541562 NULL);
542563
543- DefineCustomBoolVariable("pg_hint_plan.debug_print",
564+ DefineCustomEnumVariable("pg_hint_plan.debug_print",
544565 "Logs results of hint parsing.",
545566 NULL,
546- &pg_hint_plan_debug_print,
567+ &debug_level,
547568 false,
569+ parse_debug_level_options,
548570 PGC_USERSET,
549571 0,
550572 NULL,
@@ -554,7 +576,19 @@ _PG_init(void)
554576 DefineCustomEnumVariable("pg_hint_plan.parse_messages",
555577 "Message level of parse errors.",
556578 NULL,
557- &pg_hint_plan_parse_messages,
579+ &pg_hint_plan_message_level,
580+ INFO,
581+ parse_messages_level_options,
582+ PGC_USERSET,
583+ 0,
584+ NULL,
585+ NULL,
586+ NULL);
587+
588+ DefineCustomEnumVariable("pg_hint_plan.message_level",
589+ "Message level of debug messages.",
590+ NULL,
591+ &pg_hint_plan_message_level,
558592 INFO,
559593 parse_messages_level_options,
560594 PGC_USERSET,
@@ -893,7 +927,7 @@ quote_value(StringInfo buf, const char *value)
893927 }
894928
895929 static void
896-ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf)
930+ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf, bool nolf)
897931 {
898932 ListCell *l;
899933
@@ -907,11 +941,13 @@ ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf)
907941 quote_value(buf, (char *) lfirst(l));
908942 }
909943 }
910- appendStringInfoString(buf, ")\n");
944+ appendStringInfoString(buf, ")");
945+ if (!nolf)
946+ appendStringInfoChar(buf, '\n');
911947 }
912948
913949 static void
914-JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf)
950+JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf, bool nolf)
915951 {
916952 int i;
917953
@@ -925,8 +961,9 @@ JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf)
925961 quote_value(buf, hint->relnames[i]);
926962 }
927963 }
928- appendStringInfoString(buf, ")\n");
929-
964+ appendStringInfoString(buf, ")");
965+ if (!nolf)
966+ appendStringInfoChar(buf, '\n');
930967 }
931968
932969 static void
@@ -957,7 +994,7 @@ OuterInnerDesc(OuterInnerRels *outer_inner, StringInfo buf)
957994 }
958995
959996 static void
960-LeadingHintDesc(LeadingHint *hint, StringInfo buf)
997+LeadingHintDesc(LeadingHint *hint, StringInfo buf, bool nolf)
961998 {
962999 appendStringInfo(buf, "%s(", HINT_LEADING);
9631000 if (hint->outer_inner == NULL)
@@ -980,11 +1017,13 @@ LeadingHintDesc(LeadingHint *hint, StringInfo buf)
9801017 else
9811018 OuterInnerDesc(hint->outer_inner, buf);
9821019
983- appendStringInfoString(buf, ")\n");
1020+ appendStringInfoString(buf, ")");
1021+ if (!nolf)
1022+ appendStringInfoChar(buf, '\n');
9841023 }
9851024
9861025 static void
987-SetHintDesc(SetHint *hint, StringInfo buf)
1026+SetHintDesc(SetHint *hint, StringInfo buf, bool nolf)
9881027 {
9891028 bool is_first = true;
9901029 ListCell *l;
@@ -999,11 +1038,13 @@ SetHintDesc(SetHint *hint, StringInfo buf)
9991038
10001039 quote_value(buf, (char *) lfirst(l));
10011040 }
1002- appendStringInfo(buf, ")\n");
1041+ appendStringInfo(buf, ")");
1042+ if (!nolf)
1043+ appendStringInfoChar(buf, '\n');
10031044 }
10041045
10051046 static void
1006-RowsHintDesc(RowsHint *hint, StringInfo buf)
1047+RowsHintDesc(RowsHint *hint, StringInfo buf, bool nolf)
10071048 {
10081049 int i;
10091050
@@ -1018,8 +1059,9 @@ RowsHintDesc(RowsHint *hint, StringInfo buf)
10181059 }
10191060 }
10201061 appendStringInfo(buf, " %s", hint->rows_str);
1021- appendStringInfoString(buf, ")\n");
1022-
1062+ appendStringInfoString(buf, ")");
1063+ if (!nolf)
1064+ appendStringInfoChar(buf, '\n');
10231065 }
10241066
10251067 /*
@@ -1028,18 +1070,26 @@ RowsHintDesc(RowsHint *hint, StringInfo buf)
10281070 */
10291071 static void
10301072 desc_hint_in_state(HintState *hstate, StringInfo buf, const char *title,
1031- HintStatus state)
1073+ HintStatus state, bool nolf)
10321074 {
1033- int i;
1075+ int i, nshown;
1076+
1077+ appendStringInfo(buf, "%s:", title);
1078+ if (!nolf)
1079+ appendStringInfoChar(buf, '\n');
10341080
1035- appendStringInfo(buf, "%s:\n", title);
1081+ nshown = 0;
10361082 for (i = 0; i < hstate->nall_hints; i++)
10371083 {
10381084 if (hstate->all_hints[i]->state != state)
10391085 continue;
10401086
1041- hstate->all_hints[i]->desc_func(hstate->all_hints[i], buf);
1087+ hstate->all_hints[i]->desc_func(hstate->all_hints[i], buf, nolf);
1088+ nshown++;
10421089 }
1090+
1091+ if (nolf && nshown == 0)
1092+ appendStringInfoString(buf, "(none)");
10431093 }
10441094
10451095 /*
@@ -1059,16 +1109,43 @@ HintStateDump(HintState *hstate)
10591109 initStringInfo(&buf);
10601110
10611111 appendStringInfoString(&buf, "pg_hint_plan:\n");
1062- desc_hint_in_state(hstate, &buf, "used hint", HINT_STATE_USED);
1063- desc_hint_in_state(hstate, &buf, "not used hint", HINT_STATE_NOTUSED);
1064- desc_hint_in_state(hstate, &buf, "duplication hint", HINT_STATE_DUPLICATION);
1065- desc_hint_in_state(hstate, &buf, "error hint", HINT_STATE_ERROR);
1112+ desc_hint_in_state(hstate, &buf, "used hint", HINT_STATE_USED, false);
1113+ desc_hint_in_state(hstate, &buf, "not used hint", HINT_STATE_NOTUSED, false);
1114+ desc_hint_in_state(hstate, &buf, "duplication hint", HINT_STATE_DUPLICATION, false);
1115+ desc_hint_in_state(hstate, &buf, "error hint", HINT_STATE_ERROR, false);
10661116
10671117 elog(LOG, "%s", buf.data);
10681118
10691119 pfree(buf.data);
10701120 }
10711121
1122+static void
1123+HintStateDump2(HintState *hstate)
1124+{
1125+ StringInfoData buf;
1126+
1127+ if (!hstate)
1128+ {
1129+ elog(pg_hint_plan_message_level,
1130+ "pg_hint_plan%s: HintStateDump:\nno hint", qnostr);
1131+ return;
1132+ }
1133+
1134+ initStringInfo(&buf);
1135+ appendStringInfo(&buf, "pg_hint_plan%s: HintStateDump: ", qnostr);
1136+ desc_hint_in_state(hstate, &buf, "{used hints", HINT_STATE_USED, true);
1137+ desc_hint_in_state(hstate, &buf, "}, {not used hints", HINT_STATE_NOTUSED, true);
1138+ desc_hint_in_state(hstate, &buf, "}, {duplicate hints", HINT_STATE_DUPLICATION, true);
1139+ desc_hint_in_state(hstate, &buf, "}, {error hints", HINT_STATE_ERROR, true);
1140+ appendStringInfoChar(&buf, '}');
1141+
1142+ ereport(pg_hint_plan_message_level,
1143+ (errhidestmt(true),
1144+ errmsg("%s", buf.data)));
1145+
1146+ pfree(buf.data);
1147+}
1148+
10721149 /*
10731150 * compare functions
10741151 */
@@ -2145,10 +2222,12 @@ set_config_option_wrapper(const char *name, const char *value,
21452222 errdata = CopyErrorData();
21462223 FlushErrorState();
21472224
2148- ereport(elevel, (errcode(errdata->sqlerrcode),
2149- errmsg("%s", errdata->message),
2150- errdata->detail ? errdetail("%s", errdata->detail) : 0,
2151- errdata->hint ? errhint("%s", errdata->hint) : 0));
2225+ ereport(elevel,
2226+ (errcode(errdata->sqlerrcode),
2227+ errhidestmt(hidestmt),
2228+ errmsg("%s", errdata->message),
2229+ errdata->detail ? errdetail("%s", errdata->detail) : 0,
2230+ errdata->hint ? errhint("%s", errdata->hint) : 0));
21522231 FreeErrorData(errdata);
21532232 }
21542233 PG_END_TRY();
@@ -2174,7 +2253,7 @@ set_config_options(SetHint **options, int noptions, GucContext context)
21742253
21752254 result = set_config_option_wrapper(hint->name, hint->value, context,
21762255 PGC_S_SESSION, GUC_ACTION_SAVE, true,
2177- pg_hint_plan_parse_messages);
2256+ pg_hint_plan_message_level);
21782257 if (result != 0)
21792258 hint->base.state = HINT_STATE_USED;
21802259 else
@@ -2243,6 +2322,10 @@ pg_hint_plan_ProcessUtility(Node *parsetree, const char *queryString,
22432322 */
22442323 if (!pg_hint_plan_enable_hint || nested_level > 0)
22452324 {
2325+ if (debug_level > 1)
2326+ ereport(pg_hint_plan_message_level,
2327+ (errmsg ("pg_hint_plan: ProcessUtility:"
2328+ " pg_hint_plan.enable_hint = off")));
22462329 if (prev_ProcessUtility)
22472330 (*prev_ProcessUtility) (parsetree, queryString,
22482331 context, params,
@@ -2308,6 +2391,12 @@ pg_hint_plan_ProcessUtility(Node *parsetree, const char *queryString,
23082391
23092392 if (stmt_name)
23102393 {
2394+ if (debug_level > 1)
2395+ ereport(pg_hint_plan_message_level,
2396+ (errmsg ("pg_hint_plan: ProcessUtility:"
2397+ " stmt_name = \"%s\", statement=\"%s\"",
2398+ stmt_name, queryString)));
2399+
23112400 PG_TRY();
23122401 {
23132402 if (prev_ProcessUtility)
@@ -2386,6 +2475,13 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
23862475 int save_nestlevel;
23872476 PlannedStmt *result;
23882477 HintState *hstate;
2478+ char msgstr[1024];
2479+
2480+ qnostr[0] = 0;
2481+ strcpy(msgstr, "");
2482+ if (debug_level > 1)
2483+ snprintf(qnostr, sizeof(qnostr), "[qno=0x%x]", qno++);
2484+ hidestmt = false;
23892485
23902486 /*
23912487 * Use standard planner if pg_hint_plan is disabled or current nesting
@@ -2393,7 +2489,16 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
23932489 * plan with current_hint if any, so set it to NULL.
23942490 */
23952491 if (!pg_hint_plan_enable_hint || nested_level > 0)
2492+ {
2493+ if (debug_level > 1)
2494+ elog(pg_hint_plan_message_level,
2495+ "pg_hint_plan%s: planner: enable_hint=%d,"
2496+ " nested_level=%d",
2497+ qnostr, pg_hint_plan_enable_hint, nested_level);
2498+ hidestmt = true;
2499+
23962500 goto standard_planner_proc;
2501+ }
23972502
23982503 /* Create hint struct from client-supplied query string. */
23992504 query = get_query_string();
@@ -2438,12 +2543,41 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
24382543 &query_len,
24392544 GetDatabaseEncoding());
24402545 hints = get_hints_from_table(norm_query, application_name);
2441- elog(DEBUG1,
2442- "pg_hint_plan: get_hints_from_table [%s][%s]=>[%s]",
2443- norm_query, application_name, hints ? hints : "(none)");
2546+ if (debug_level > 1)
2547+ {
2548+ if (hints)
2549+ snprintf(msgstr, 1024, "hints from table: \"%s\":"
2550+ " normalzed_query=\"%s\", application name =\"%s\"",
2551+ hints, norm_query, application_name);
2552+ else
2553+ {
2554+ ereport(pg_hint_plan_message_level,
2555+ (errhidestmt(hidestmt),
2556+ errmsg("pg_hint_plan%s:"
2557+ " no match found in table:"
2558+ " application name = \"%s\","
2559+ " normalzed_query=\"%s\"",
2560+ qnostr, application_name, norm_query)));
2561+ hidestmt = true;
2562+ }
2563+ }
24442564 }
24452565 if (hints == NULL)
2566+ {
24462567 hints = get_hints_from_comment(query);
2568+
2569+ if (debug_level > 1)
2570+ {
2571+ snprintf(msgstr, 1024, "hints in comment=\"%s\"",
2572+ hints ? hints : "(none)");
2573+ if (debug_level > 2 ||
2574+ stmt_name || strcmp(query, debug_query_string))
2575+ snprintf(msgstr + strlen(msgstr), 1024- strlen(msgstr),
2576+ ", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2577+ stmt_name, query, debug_query_string);
2578+ }
2579+ }
2580+
24472581 hstate = create_hintstate(parse, hints);
24482582
24492583 /*
@@ -2481,6 +2615,15 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
24812615 if (enable_hashjoin)
24822616 current_hint->init_join_mask |= ENABLE_HASHJOIN;
24832617
2618+ if (debug_level > 1)
2619+ {
2620+ ereport(pg_hint_plan_message_level,
2621+ (errhidestmt(hidestmt),
2622+ errmsg("pg_hint_plan%s: planner: %s",
2623+ qnostr, msgstr)));
2624+ hidestmt = true;
2625+ }
2626+
24842627 /*
24852628 * Use PG_TRY mechanism to recover GUC parameters and current_hint to the
24862629 * state when this planner started when error occurred in planner.
@@ -2505,8 +2648,10 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
25052648 PG_END_TRY();
25062649
25072650 /* Print hint in debug mode. */
2508- if (pg_hint_plan_debug_print)
2651+ if (debug_level == 1)
25092652 HintStateDump(current_hint);
2653+ else if (debug_level > 1)
2654+ HintStateDump2(current_hint);
25102655
25112656 /*
25122657 * Rollback changes of GUC parameters, and pop current hint context from
@@ -2518,6 +2663,14 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
25182663 return result;
25192664
25202665 standard_planner_proc:
2666+ if (debug_level > 1)
2667+ {
2668+ ereport(pg_hint_plan_message_level,
2669+ (errhidestmt(hidestmt),
2670+ errmsg("pg_hint_plan%s: planner: no valid hint (%s)",
2671+ qnostr, msgstr)));
2672+ hidestmt = true;
2673+ }
25212674 current_hint = NULL;
25222675 if (prev_planner)
25232676 return (*prev_planner) (parse, cursorOptions, boundParams);
@@ -2624,7 +2777,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
26242777 * other than it.
26252778 */
26262779 prev = NULL;
2627- if (pg_hint_plan_debug_print)
2780+ if (debug_level > 0)
26282781 initStringInfo(&buf);
26292782
26302783 for (cell = list_head(rel->indexlist); cell; cell = next)
@@ -2649,7 +2802,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
26492802 if (result)
26502803 {
26512804 use_index = true;
2652- if (pg_hint_plan_debug_print)
2805+ if (debug_level > 0)
26532806 {
26542807 appendStringInfoCharMacro(&buf, ' ');
26552808 quote_value(&buf, indexname);
@@ -2808,7 +2961,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
28082961 use_index = true;
28092962
28102963 /* to log the candidate of index */
2811- if (pg_hint_plan_debug_print)
2964+ if (debug_level > 0)
28122965 {
28132966 appendStringInfoCharMacro(&buf, ' ');
28142967 quote_value(&buf, indexname);
@@ -2826,7 +2979,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId)
28262979 pfree(indexname);
28272980 }
28282981
2829- if (pg_hint_plan_debug_print)
2982+ if (debug_level == 1)
28302983 {
28312984 char *relname;
28322985 StringInfoData rel_buf;
@@ -2944,7 +3097,18 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
29443097 * nesting depth is at SPI calls.
29453098 */
29463099 if (!current_hint || nested_level > 0)
3100+ {
3101+ if (debug_level > 1)
3102+ ereport(pg_hint_plan_message_level,
3103+ (errhidestmt(true),
3104+ errmsg ("pg_hint_plan%s: get_relation_info"
3105+ " no hint to apply: relation=%u(%s), inhparent=%d,"
3106+ " current_hint=%p, nested_level=%d",
3107+ qnostr, relationObjectId,
3108+ get_rel_name(relationObjectId),
3109+ inhparent, current_hint, nested_level)));
29473110 return;
3111+ }
29483112
29493113 /*
29503114 * We could register the parent relation of the following children here
@@ -2954,7 +3118,18 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
29543118 * called for them.
29553119 */
29563120 if (inhparent)
3121+ {
3122+ if (debug_level > 1)
3123+ ereport(pg_hint_plan_message_level,
3124+ (errhidestmt(true),
3125+ errmsg ("pg_hint_plan%s: get_relation_info"
3126+ " skipping inh parent: relation=%u(%s), inhparent=%d,"
3127+ " current_hint=%p, nested_level=%d",
3128+ qnostr, relationObjectId,
3129+ get_rel_name(relationObjectId),
3130+ inhparent, current_hint, nested_level)));
29573131 return;
3132+ }
29583133
29593134 /* Find the parent for this relation */
29603135 foreach (l, root->append_rel_list)
@@ -3045,6 +3220,16 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
30453220 relationObjectId);
30463221
30473222 /* Scan fixation status is the same to the parent. */
3223+ if (debug_level > 1)
3224+ ereport(pg_hint_plan_message_level,
3225+ (errhidestmt(true),
3226+ errmsg("pg_hint_plan%s: get_relation_info:"
3227+ " index deletion by parent hint: "
3228+ "relation=%u(%s), inhparent=%d, current_hint=%p,"
3229+ " nested_level=%d",
3230+ qnostr, relationObjectId,
3231+ get_rel_name(relationObjectId),
3232+ inhparent, current_hint, nested_level)));
30483233 return;
30493234 }
30503235
@@ -3055,10 +3240,35 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId,
30553240 hint->base.state = HINT_STATE_USED;
30563241
30573242 delete_indexes(hint, rel, InvalidOid);
3243+
3244+ if (debug_level > 1)
3245+ ereport(pg_hint_plan_message_level,
3246+ (errhidestmt(true),
3247+ errmsg ("pg_hint_plan%s: get_relation_info"
3248+ " index deletion:"
3249+ " relation=%u(%s), inhparent=%d, current_hint=%p,"
3250+ " nested_level=%d, scanmask=0x%x",
3251+ qnostr, relationObjectId,
3252+ get_rel_name(relationObjectId),
3253+ inhparent, current_hint, nested_level,
3254+ hint->enforce_mask)));
30583255 }
30593256 else
3257+ {
3258+ if (debug_level > 1)
3259+ ereport(pg_hint_plan_message_level,
3260+ (errhidestmt (true),
3261+ errmsg ("pg_hint_plan%s: get_relation_info"
3262+ " no hint applied:"
3263+ " relation=%u(%s), inhparent=%d, current_hint=%p,"
3264+ " nested_level=%d, scanmask=0x%x",
3265+ qnostr, relationObjectId,
3266+ get_rel_name(relationObjectId),
3267+ inhparent, current_hint, nested_level,
3268+ current_hint->init_scan_mask)));
30603269 set_scan_config_options(current_hint->init_scan_mask,
30613270 current_hint->context);
3271+ }
30623272 return;
30633273 }
30643274
Show on old repository browser