リビジョン | 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.
@@ -42,7 +42,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val; | ||
42 | 42 | |
43 | 43 | /*+ Test (t1 t2) */ |
44 | 44 | 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) " | |
46 | 46 | DETAIL: Unrecognized hint keyword "Test". |
47 | 47 | QUERY PLAN |
48 | 48 | -------------------------------------- |
@@ -86,7 +86,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id; | ||
86 | 86 | |
87 | 87 | /*+Set(enable_indexscan off) /* nest comment */ */ |
88 | 88 | 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 */ */ | |
90 | 90 | EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;" |
91 | 91 | DETAIL: Nested block comments are not supported. |
92 | 92 | QUERY PLAN |
@@ -259,7 +259,7 @@ error hint: | ||
259 | 259 | |
260 | 260 | /*+Set(work_mem TO "1MB")*/ |
261 | 261 | 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")" | |
263 | 263 | DETAIL: Set hint requires name and value of GUC parameter. |
264 | 264 | LOG: pg_hint_plan: |
265 | 265 | used hint: |
@@ -278,7 +278,7 @@ Set(work_mem TO 1MB) | ||
278 | 278 | |
279 | 279 | /*+SeqScan(t1 t2)*/ |
280 | 280 | 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 "" | |
282 | 282 | DETAIL: SeqScan hint accepts only one relation. |
283 | 283 | LOG: pg_hint_plan: |
284 | 284 | used hint: |
@@ -655,7 +655,7 @@ error hint: | ||
655 | 655 | |
656 | 656 | /*+Leading( */ |
657 | 657 | 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 "" | |
659 | 659 | DETAIL: Closing parenthesis is necessary. |
660 | 660 | QUERY PLAN |
661 | 661 | -------------------------------------------------- |
@@ -675,7 +675,7 @@ DETAIL: Closing parenthesis is necessary. | ||
675 | 675 | |
676 | 676 | /*+Leading( )*/ |
677 | 677 | 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( )" | |
679 | 679 | DETAIL: Leading hint requires at least two relations. |
680 | 680 | LOG: pg_hint_plan: |
681 | 681 | used hint: |
@@ -702,7 +702,7 @@ Leading() | ||
702 | 702 | |
703 | 703 | /*+Leading( t3 )*/ |
704 | 704 | 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 )" | |
706 | 706 | DETAIL: Leading hint requires at least two relations. |
707 | 707 | LOG: pg_hint_plan: |
708 | 708 | used hint: |
@@ -804,7 +804,7 @@ error hint: | ||
804 | 804 | |
805 | 805 | /*+Leading(t3 t4 t1 t2 t1)*/ |
806 | 806 | 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)" | |
808 | 808 | DETAIL: Relation name "t1" is duplicated. |
809 | 809 | LOG: pg_hint_plan: |
810 | 810 | used hint: |
@@ -831,7 +831,7 @@ Leading(t3 t4 t1 t2 t1) | ||
831 | 831 | |
832 | 832 | /*+Leading(t3 t4 t4)*/ |
833 | 833 | 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)" | |
835 | 835 | DETAIL: Relation name "t4" is duplicated. |
836 | 836 | LOG: pg_hint_plan: |
837 | 837 | used hint: |
@@ -4334,25 +4334,25 @@ error hint: | ||
4334 | 4334 | -- duplicate hint test |
4335 | 4335 | /*+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)*/ |
4336 | 4336 | 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)" | |
4338 | 4338 | 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)" | |
4340 | 4340 | 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)" | |
4342 | 4342 | 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)" | |
4344 | 4344 | 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)" | |
4346 | 4346 | 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)" | |
4348 | 4348 | 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)" | |
4350 | 4350 | 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)" | |
4352 | 4352 | 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)" | |
4354 | 4354 | 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)" | |
4356 | 4356 | DETAIL: Conflict leading hint. |
4357 | 4357 | LOG: pg_hint_plan: |
4358 | 4358 | used hint: |
@@ -5197,7 +5197,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id | ||
5197 | 5197 | |
5198 | 5198 | /*+NestLoop(t1 t2)*/ |
5199 | 5199 | 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)" | |
5201 | 5201 | DETAIL: Relation name "t1" is ambiguous. |
5202 | 5202 | LOG: pg_hint_plan: |
5203 | 5203 | used hint: |
@@ -5219,7 +5219,7 @@ NestLoop(t1 t2) | ||
5219 | 5219 | |
5220 | 5220 | /*+Leading(t1 t2 t1)*/ |
5221 | 5221 | 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)" | |
5223 | 5223 | DETAIL: Relation name "t1" is ambiguous. |
5224 | 5224 | LOG: pg_hint_plan: |
5225 | 5225 | used hint: |
@@ -5462,7 +5462,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = | ||
5462 | 5462 | |
5463 | 5463 | /*+Leading((t1))*/ |
5464 | 5464 | 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))" | |
5466 | 5466 | DETAIL: Leading hint requires two sets of relations when parentheses nests. |
5467 | 5467 | LOG: pg_hint_plan: |
5468 | 5468 | used hint: |
@@ -5509,7 +5509,7 @@ error hint: | ||
5509 | 5509 | |
5510 | 5510 | /*+Leading((t1 t2 t3))*/ |
5511 | 5511 | 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))" | |
5513 | 5513 | DETAIL: Leading hint requires two sets of relations when parentheses nests. |
5514 | 5514 | LOG: pg_hint_plan: |
5515 | 5515 | used hint: |
@@ -5774,7 +5774,7 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = | ||
5774 | 5774 | |
5775 | 5775 | /*+Leading(((t1 t2) t3)) Leading(((t3 t1) t2))*/ |
5776 | 5776 | 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))" | |
5778 | 5778 | DETAIL: Conflict leading hint. |
5779 | 5779 | LOG: pg_hint_plan: |
5780 | 5780 | used hint: |
@@ -8128,7 +8128,7 @@ error hint: | ||
8128 | 8128 | |
8129 | 8129 | /*+ Rows(t1 t2 #aa) */ |
8130 | 8130 | 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" | |
8132 | 8132 | DETAIL: Rows hint requires valid number as rows estimation. |
8133 | 8133 | LOG: pg_hint_plan: |
8134 | 8134 | used hint: |
@@ -8147,7 +8147,7 @@ Rows(t1 t2 #aa) | ||
8147 | 8147 | |
8148 | 8148 | /*+ Rows(t1 t2 /99) */ |
8149 | 8149 | 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" | |
8151 | 8151 | DETAIL: Unrecognized rows value type notation. |
8152 | 8152 | LOG: pg_hint_plan: |
8153 | 8153 | used hint: |
@@ -997,7 +997,7 @@ error hint: | ||
997 | 997 | -- No. A-9-2-3 |
998 | 998 | /*+SeqScan(()*/ |
999 | 999 | 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 "()" | |
1001 | 1001 | DETAIL: Zero-length delimited string. |
1002 | 1002 | QUERY PLAN |
1003 | 1003 | ---------------------------------- |
@@ -1024,9 +1024,9 @@ error hint: | ||
1024 | 1024 | -- No. A-9-2-4 |
1025 | 1025 | /*+SeqScan())*/ |
1026 | 1026 | 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 ")" | |
1028 | 1028 | 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 ")" | |
1030 | 1030 | DETAIL: Unrecognized hint keyword ")". |
1031 | 1031 | LOG: pg_hint_plan: |
1032 | 1032 | used hint: |
@@ -1075,7 +1075,7 @@ error hint: | ||
1075 | 1075 | -- No. A-9-2-5 |
1076 | 1076 | /*+SeqScan(")*/ |
1077 | 1077 | 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 "" | |
1079 | 1079 | DETAIL: Unterminated quoted string. |
1080 | 1080 | QUERY PLAN |
1081 | 1081 | ----------------------------------- |
@@ -1117,7 +1117,7 @@ error hint: | ||
1117 | 1117 | -- No. A-9-2-6 |
1118 | 1118 | /*+SeqScan( )*/ |
1119 | 1119 | 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 "" | |
1121 | 1121 | DETAIL: SeqScan hint requires a relation. |
1122 | 1122 | LOG: pg_hint_plan: |
1123 | 1123 | used hint: |
@@ -1166,7 +1166,7 @@ error hint: | ||
1166 | 1166 | -- No. A-9-2-7 |
1167 | 1167 | /*+SeqScan( )*/ |
1168 | 1168 | 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 "" | |
1170 | 1170 | DETAIL: SeqScan hint requires a relation. |
1171 | 1171 | LOG: pg_hint_plan: |
1172 | 1172 | used hint: |
@@ -1218,7 +1218,7 @@ error hint: | ||
1218 | 1218 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 " |
1219 | 1219 | " WHERE " |
1220 | 1220 | ".c1 = 1; |
1221 | -INFO: hint syntax error at or near "" | |
1221 | +INFO: pg_hint_plan: hint syntax error at or near "" | |
1222 | 1222 | DETAIL: SeqScan hint requires a relation. |
1223 | 1223 | LOG: pg_hint_plan: |
1224 | 1224 | used hint: |
@@ -1397,7 +1397,7 @@ error hint: | ||
1397 | 1397 | -- No. A-9-2-11 |
1398 | 1398 | /*+SeqScan(/**/)*/ |
1399 | 1399 | 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 "/**/)*/ | |
1401 | 1401 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;" |
1402 | 1402 | DETAIL: Nested block comments are not supported. |
1403 | 1403 | QUERY PLAN |
@@ -1408,7 +1408,7 @@ DETAIL: Nested block comments are not supported. | ||
1408 | 1408 | |
1409 | 1409 | /*+SeqScan(/**//**//**/)*/ |
1410 | 1410 | 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 "/**//**//**/)*/ | |
1412 | 1412 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;" |
1413 | 1413 | DETAIL: Nested block comments are not supported. |
1414 | 1414 | QUERY PLAN |
@@ -1424,7 +1424,7 @@ Set/**/あ")*/ | ||
1424 | 1424 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()"" |
1425 | 1425 | Set/**/あ" WHERE "tT()"" |
1426 | 1426 | Set/**/あ".c1 = 1; |
1427 | -INFO: hint syntax error at or near "/**/あ")*/ | |
1427 | +INFO: pg_hint_plan: hint syntax error at or near "/**/あ")*/ | |
1428 | 1428 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()"" |
1429 | 1429 | Set/**/あ" WHERE "tT()"" |
1430 | 1430 | Set/**/あ".c1 = 1;" |
@@ -1480,7 +1480,7 @@ error hint: | ||
1480 | 1480 | -- No. A-7-4-1 |
1481 | 1481 | /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/ |
1482 | 1482 | 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)" | |
1484 | 1484 | DETAIL: Opening parenthesis is necessary. |
1485 | 1485 | LOG: pg_hint_plan: |
1486 | 1486 | used hint: |
@@ -1500,7 +1500,7 @@ error hint: | ||
1500 | 1500 | -- No. A-7-4-2 |
1501 | 1501 | /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/ |
1502 | 1502 | 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)" | |
1504 | 1504 | DETAIL: Zero-length delimited string. |
1505 | 1505 | LOG: pg_hint_plan: |
1506 | 1506 | used hint: |
@@ -1520,7 +1520,7 @@ error hint: | ||
1520 | 1520 | -- No. A-7-4-3 |
1521 | 1521 | /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/ |
1522 | 1522 | 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 "" | |
1524 | 1524 | DETAIL: Unterminated quoted string. |
1525 | 1525 | LOG: pg_hint_plan: |
1526 | 1526 | used hint: |
@@ -1540,7 +1540,7 @@ error hint: | ||
1540 | 1540 | -- No. A-7-4-4 |
1541 | 1541 | /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/ |
1542 | 1542 | 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)" | |
1544 | 1544 | DETAIL: Zero-length delimited string. |
1545 | 1545 | LOG: pg_hint_plan: |
1546 | 1546 | used hint: |
@@ -1560,7 +1560,7 @@ error hint: | ||
1560 | 1560 | -- No. A-7-4-5 |
1561 | 1561 | /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/ |
1562 | 1562 | 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)" | |
1564 | 1564 | DETAIL: Unrecognized hint keyword "NoSet". |
1565 | 1565 | LOG: pg_hint_plan: |
1566 | 1566 | used hint: |
@@ -1580,7 +1580,7 @@ error hint: | ||
1580 | 1580 | -- No. A-7-4-6 |
1581 | 1581 | /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/ |
1582 | 1582 | 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)" | |
1584 | 1584 | DETAIL: Unrecognized hint keyword ""Set"". |
1585 | 1585 | LOG: pg_hint_plan: |
1586 | 1586 | used hint: |
@@ -1600,7 +1600,7 @@ error hint: | ||
1600 | 1600 | -- No. A-7-4-7 |
1601 | 1601 | /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/ |
1602 | 1602 | 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)*/ | |
1604 | 1604 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;" |
1605 | 1605 | DETAIL: Nested block comments are not supported. |
1606 | 1606 | QUERY PLAN |
@@ -1868,7 +1868,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1; | ||
1868 | 1868 | |
1869 | 1869 | -- No. A-8-3-4 |
1870 | 1870 | 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. | |
1872 | 1873 | SHOW pg_hint_plan.debug_print; |
1873 | 1874 | pg_hint_plan.debug_print |
1874 | 1875 | -------------------------- |
@@ -1908,7 +1909,7 @@ DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: | ||
1908 | 1909 | DEBUG: StartTransactionCommand |
1909 | 1910 | DEBUG: StartTransaction |
1910 | 1911 | 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 "" | |
1912 | 1913 | DETAIL: Opening parenthesis is necessary. |
1913 | 1914 | DEBUG: CommitTransactionCommand |
1914 | 1915 | DEBUG: CommitTransaction |
@@ -1964,7 +1965,7 @@ DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: | ||
1964 | 1965 | DEBUG: StartTransactionCommand |
1965 | 1966 | DEBUG: StartTransaction |
1966 | 1967 | 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 "" | |
1968 | 1969 | DETAIL: Opening parenthesis is necessary. |
1969 | 1970 | DEBUG: CommitTransactionCommand |
1970 | 1971 | DEBUG: CommitTransaction |
@@ -2020,7 +2021,7 @@ DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: | ||
2020 | 2021 | DEBUG: StartTransactionCommand |
2021 | 2022 | DEBUG: StartTransaction |
2022 | 2023 | 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 "" | |
2024 | 2025 | DETAIL: Opening parenthesis is necessary. |
2025 | 2026 | DEBUG: CommitTransactionCommand |
2026 | 2027 | DEBUG: CommitTransaction |
@@ -2050,7 +2051,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2050 | 2051 | (1 row) |
2051 | 2052 | |
2052 | 2053 | /*+Set*/SELECT 1; |
2053 | -DEBUG: hint syntax error at or near "" | |
2054 | +DEBUG: pg_hint_plan: hint syntax error at or near "" | |
2054 | 2055 | DETAIL: Opening parenthesis is necessary. |
2055 | 2056 | ?column? |
2056 | 2057 | ---------- |
@@ -2073,7 +2074,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2073 | 2074 | (1 row) |
2074 | 2075 | |
2075 | 2076 | /*+Set*/SELECT 1; |
2076 | -DEBUG: hint syntax error at or near "" | |
2077 | +DEBUG: pg_hint_plan: hint syntax error at or near "" | |
2077 | 2078 | DETAIL: Opening parenthesis is necessary. |
2078 | 2079 | ?column? |
2079 | 2080 | ---------- |
@@ -2096,7 +2097,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2096 | 2097 | (1 row) |
2097 | 2098 | |
2098 | 2099 | /*+Set*/SELECT 1; |
2099 | -LOG: hint syntax error at or near "" | |
2100 | +LOG: pg_hint_plan: hint syntax error at or near "" | |
2100 | 2101 | DETAIL: Opening parenthesis is necessary. |
2101 | 2102 | ?column? |
2102 | 2103 | ---------- |
@@ -2119,7 +2120,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2119 | 2120 | (1 row) |
2120 | 2121 | |
2121 | 2122 | /*+Set*/SELECT 1; |
2122 | -INFO: hint syntax error at or near "" | |
2123 | +INFO: pg_hint_plan: hint syntax error at or near "" | |
2123 | 2124 | DETAIL: Opening parenthesis is necessary. |
2124 | 2125 | ?column? |
2125 | 2126 | ---------- |
@@ -2128,7 +2129,7 @@ DETAIL: Opening parenthesis is necessary. | ||
2128 | 2129 | |
2129 | 2130 | SET client_min_messages TO notice; |
2130 | 2131 | /*+Set*/SELECT 1; |
2131 | -INFO: hint syntax error at or near "" | |
2132 | +INFO: pg_hint_plan: hint syntax error at or near "" | |
2132 | 2133 | DETAIL: Opening parenthesis is necessary. |
2133 | 2134 | ?column? |
2134 | 2135 | ---------- |
@@ -2144,7 +2145,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2144 | 2145 | (1 row) |
2145 | 2146 | |
2146 | 2147 | /*+Set*/SELECT 1; |
2147 | -NOTICE: hint syntax error at or near "" | |
2148 | +NOTICE: pg_hint_plan: hint syntax error at or near "" | |
2148 | 2149 | DETAIL: Opening parenthesis is necessary. |
2149 | 2150 | ?column? |
2150 | 2151 | ---------- |
@@ -2167,7 +2168,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2167 | 2168 | (1 row) |
2168 | 2169 | |
2169 | 2170 | /*+Set*/SELECT 1; |
2170 | -WARNING: hint syntax error at or near "" | |
2171 | +WARNING: pg_hint_plan: hint syntax error at or near "" | |
2171 | 2172 | DETAIL: Opening parenthesis is necessary. |
2172 | 2173 | ?column? |
2173 | 2174 | ---------- |
@@ -2190,7 +2191,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2190 | 2191 | (1 row) |
2191 | 2192 | |
2192 | 2193 | /*+Set*/SELECT 1; |
2193 | -ERROR: hint syntax error at or near "" | |
2194 | +ERROR: pg_hint_plan: hint syntax error at or near "" | |
2194 | 2195 | DETAIL: Opening parenthesis is necessary. |
2195 | 2196 | SET client_min_messages TO fatal; |
2196 | 2197 | /*+Set*/SELECT 1; |
@@ -2204,7 +2205,7 @@ SHOW pg_hint_plan.parse_messages; | ||
2204 | 2205 | (1 row) |
2205 | 2206 | |
2206 | 2207 | /*+Set*/SELECT 1; |
2207 | -INFO: hint syntax error at or near "" | |
2208 | +INFO: pg_hint_plan: hint syntax error at or near "" | |
2208 | 2209 | DETAIL: Opening parenthesis is necessary. |
2209 | 2210 | ?column? |
2210 | 2211 | ---------- |
@@ -2309,7 +2310,7 @@ TRUNCATE hint_plan.hints; | ||
2309 | 2310 | ---- |
2310 | 2311 | -- No. A-9-1-1 |
2311 | 2312 | /*+"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)" | |
2313 | 2314 | DETAIL: Unrecognized hint keyword ""Set"". |
2314 | 2315 | ?column? |
2315 | 2316 | ---------- |
@@ -2317,9 +2318,9 @@ DETAIL: Unrecognized hint keyword ""Set"". | ||
2317 | 2318 | (1 row) |
2318 | 2319 | |
2319 | 2320 | /*+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)" | |
2321 | 2322 | 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)" | |
2323 | 2324 | DETAIL: Unrecognized hint keyword "". |
2324 | 2325 | ?column? |
2325 | 2326 | ---------- |
@@ -2327,7 +2328,7 @@ DETAIL: Unrecognized hint keyword "". | ||
2327 | 2328 | (1 row) |
2328 | 2329 | |
2329 | 2330 | /*+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 "" | |
2331 | 2332 | DETAIL: Closing parenthesis is necessary. |
2332 | 2333 | ?column? |
2333 | 2334 | ---------- |
@@ -2382,7 +2383,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)'; | ||
2382 | 2383 | |
2383 | 2384 | /*+TidScan(t1)BitmapScan(t1)*/ |
2384 | 2385 | 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)" | |
2386 | 2387 | DETAIL: Conflict scan method hint. |
2387 | 2388 | LOG: pg_hint_plan: |
2388 | 2389 | used hint: |
@@ -2403,9 +2404,9 @@ error hint: | ||
2403 | 2404 | |
2404 | 2405 | /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/ |
2405 | 2406 | 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)" | |
2407 | 2408 | 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)" | |
2409 | 2410 | DETAIL: Conflict scan method hint. |
2410 | 2411 | LOG: pg_hint_plan: |
2411 | 2412 | used hint: |
@@ -2425,11 +2426,11 @@ error hint: | ||
2425 | 2426 | |
2426 | 2427 | /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/ |
2427 | 2428 | 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)" | |
2429 | 2430 | 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)" | |
2431 | 2432 | 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)" | |
2433 | 2434 | DETAIL: Conflict scan method hint. |
2434 | 2435 | LOG: pg_hint_plan: |
2435 | 2436 | used hint: |
@@ -3376,7 +3377,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; | ||
3376 | 3377 | /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/ |
3377 | 3378 | PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; |
3378 | 3379 | 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)" | |
3380 | 3381 | DETAIL: Relation name "t1" is duplicated. |
3381 | 3382 | LOG: pg_hint_plan: |
3382 | 3383 | used hint: |
@@ -3439,7 +3440,7 @@ SELECT name, setting FROM settings; | ||
3439 | 3440 | SET pg_hint_plan.parse_messages TO error; |
3440 | 3441 | /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/ |
3441 | 3442 | 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)" | |
3443 | 3444 | DETAIL: Relation name "t1" is duplicated. |
3444 | 3445 | SELECT name, setting FROM settings; |
3445 | 3446 | name | setting |
@@ -3538,7 +3539,7 @@ SELECT name, setting FROM settings; | ||
3538 | 3539 | SET pg_hint_plan.parse_messages TO error; |
3539 | 3540 | /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/ |
3540 | 3541 | 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)" | |
3542 | 3543 | DETAIL: Relation name "t1" is duplicated. |
3543 | 3544 | SELECT name, setting FROM settings; |
3544 | 3545 | name | setting |
@@ -4712,7 +4713,7 @@ error hint: | ||
4712 | 4713 | EXPLAIN (COSTS false) |
4713 | 4714 | SELECT recall_planner() FROM s1.t1 t_1 |
4714 | 4715 | 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)" | |
4716 | 4717 | DETAIL: Relation name "t_1" is duplicated. |
4717 | 4718 | CONTEXT: SQL function "recall_planner" during startup |
4718 | 4719 | LOG: pg_hint_plan: |
@@ -4768,7 +4769,7 @@ duplication hint: | ||
4768 | 4769 | error hint: |
4769 | 4770 | |
4770 | 4771 | 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)" | |
4772 | 4773 | DETAIL: Relation name "t_1" is duplicated. |
4773 | 4774 | LOG: pg_hint_plan: |
4774 | 4775 | used hint: |
@@ -4795,7 +4796,7 @@ EXPLAIN (COSTS false) | ||
4795 | 4796 | SELECT recall_planner() FROM s1.t1 t_1 |
4796 | 4797 | JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) |
4797 | 4798 | 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)" | |
4799 | 4800 | DETAIL: Relation name "t_1" is duplicated. |
4800 | 4801 | CONTEXT: SQL function "recall_planner" during startup |
4801 | 4802 | LOG: pg_hint_plan: |
@@ -4806,7 +4807,7 @@ error hint: | ||
4806 | 4807 | HashJoin(t_1 t_1) |
4807 | 4808 | |
4808 | 4809 | 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)" | |
4810 | 4811 | DETAIL: Relation name "t_1" is duplicated. |
4811 | 4812 | LOG: pg_hint_plan: |
4812 | 4813 | used hint: |
@@ -4831,9 +4832,9 @@ EXPLAIN (COSTS false) | ||
4831 | 4832 | SELECT recall_planner() FROM s1.t1 t_1 |
4832 | 4833 | JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) |
4833 | 4834 | 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)" | |
4835 | 4836 | 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)" | |
4837 | 4838 | DETAIL: Conflict join method hint. |
4838 | 4839 | CONTEXT: SQL function "recall_planner" during startup |
4839 | 4840 | LOG: pg_hint_plan: |
@@ -778,7 +778,7 @@ SET client_min_messages TO LOG; | ||
778 | 778 | -- No. G-2-3-1 |
779 | 779 | /*+Set(enable_indexscan on)Set(enable_indexscan off)*/ |
780 | 780 | 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)" | |
782 | 782 | DETAIL: Conflict set hint. |
783 | 783 | LOG: pg_hint_plan: |
784 | 784 | used hint: |
@@ -795,9 +795,9 @@ error hint: | ||
795 | 795 | -- No. G-2-3-2 |
796 | 796 | /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)*/ |
797 | 797 | 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)" | |
799 | 799 | 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)" | |
801 | 801 | DETAIL: Conflict set hint. |
802 | 802 | LOG: pg_hint_plan: |
803 | 803 | used hint: |
@@ -815,7 +815,7 @@ error hint: | ||
815 | 815 | -- No. G-2-3-3 |
816 | 816 | /*+Set(enable_indexscan on)Set(enable_indexscan o)*/ |
817 | 817 | 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)" | |
819 | 819 | DETAIL: Conflict set hint. |
820 | 820 | INFO: parameter "enable_indexscan" requires a Boolean value |
821 | 821 | LOG: pg_hint_plan: |
@@ -833,9 +833,9 @@ Set(enable_indexscan o) | ||
833 | 833 | -- No. G-2-3-4 |
834 | 834 | /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)*/ |
835 | 835 | 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)" | |
837 | 837 | 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)" | |
839 | 839 | DETAIL: Conflict set hint. |
840 | 840 | INFO: invalid value for parameter "client_min_messages": "DEBU" |
841 | 841 | HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error. |
@@ -858,9 +858,9 @@ Set(client_min_messages DEBU) | ||
858 | 858 | -- No. G-2-4-1 |
859 | 859 | /*+SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) */ |
860 | 860 | 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 " " | |
862 | 862 | 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) " | |
864 | 864 | DETAIL: Conflict scan method hint. |
865 | 865 | LOG: pg_hint_plan: |
866 | 866 | used hint: |
@@ -195,7 +195,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1; | ||
195 | 195 | |
196 | 196 | /*+HashJoin(t1 t1)*/ |
197 | 197 | 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)" | |
199 | 199 | DETAIL: Relation name "t1" is ambiguous. |
200 | 200 | LOG: pg_hint_plan: |
201 | 201 | used hint: |
@@ -357,7 +357,7 @@ error hint: | ||
357 | 357 | -- No. J-1-5-2 |
358 | 358 | /*+HashJoin(t1 t1)*/ |
359 | 359 | 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)" | |
361 | 361 | DETAIL: Relation name "t1" is duplicated. |
362 | 362 | LOG: pg_hint_plan: |
363 | 363 | used hint: |
@@ -379,9 +379,9 @@ HashJoin(t1 t1) | ||
379 | 379 | -- No. J-1-5-3 |
380 | 380 | /*+HashJoin(t1 t1)HashJoin(t2 t2)*/ |
381 | 381 | 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)" | |
383 | 383 | 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)" | |
385 | 385 | DETAIL: Relation name "t2" is duplicated. |
386 | 386 | LOG: pg_hint_plan: |
387 | 387 | used hint: |
@@ -417,7 +417,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND | ||
417 | 417 | |
418 | 418 | /*+HashJoin(t1 t2 t1 t2)*/ |
419 | 419 | 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)" | |
421 | 421 | DETAIL: Relation name "t1" is duplicated. |
422 | 422 | LOG: pg_hint_plan: |
423 | 423 | used hint: |
@@ -3650,7 +3650,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1; | ||
3650 | 3650 | |
3651 | 3651 | /*+HashJoin(v1t1 v1t1)*/ |
3652 | 3652 | 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)" | |
3654 | 3654 | DETAIL: Relation name "v1t1" is ambiguous. |
3655 | 3655 | LOG: pg_hint_plan: |
3656 | 3656 | used hint: |
@@ -3709,7 +3709,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1; | ||
3709 | 3709 | |
3710 | 3710 | /*+HashJoin(r4t1 r4t1)*/ |
3711 | 3711 | 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)" | |
3713 | 3713 | DETAIL: Relation name "r4t1" is ambiguous. |
3714 | 3714 | LOG: pg_hint_plan: |
3715 | 3715 | used hint: |
@@ -3864,11 +3864,11 @@ error hint: | ||
3864 | 3864 | |
3865 | 3865 | /*+ Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)*/ |
3866 | 3866 | 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)" | |
3868 | 3868 | 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)" | |
3870 | 3870 | 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)" | |
3872 | 3872 | DETAIL: Relation name "*VALUES*" is ambiguous. |
3873 | 3873 | LOG: pg_hint_plan: |
3874 | 3874 | used hint: |
@@ -4394,7 +4394,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; | ||
4394 | 4394 | -- No. J-3-3-1 |
4395 | 4395 | /*+HashJoin(t1 t2)NestLoop(t1 t2)*/ |
4396 | 4396 | 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)" | |
4398 | 4398 | DETAIL: Conflict join method hint. |
4399 | 4399 | LOG: pg_hint_plan: |
4400 | 4400 | used hint: |
@@ -4415,9 +4415,9 @@ error hint: | ||
4415 | 4415 | -- No. J-3-3-2 |
4416 | 4416 | /*+MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)*/ |
4417 | 4417 | 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)" | |
4419 | 4419 | 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)" | |
4421 | 4421 | DETAIL: Conflict join method hint. |
4422 | 4422 | LOG: pg_hint_plan: |
4423 | 4423 | used hint: |
@@ -4439,7 +4439,7 @@ error hint: | ||
4439 | 4439 | -- No. J-3-3-3 |
4440 | 4440 | /*+HashJoin(t1 t2)NestLoop(t2 t1)*/ |
4441 | 4441 | 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)" | |
4443 | 4443 | DETAIL: Conflict join method hint. |
4444 | 4444 | LOG: pg_hint_plan: |
4445 | 4445 | used hint: |
@@ -4460,9 +4460,9 @@ error hint: | ||
4460 | 4460 | -- No. J-3-3-4 |
4461 | 4461 | /*+MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)*/ |
4462 | 4462 | 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)" | |
4464 | 4464 | 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)" | |
4466 | 4466 | DETAIL: Conflict join method hint. |
4467 | 4467 | LOG: pg_hint_plan: |
4468 | 4468 | used hint: |
@@ -4571,7 +4571,7 @@ error hint: | ||
4571 | 4571 | -- No. J-3-4-7 |
4572 | 4572 | /*+NestLoop()*/ |
4573 | 4573 | 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 "" | |
4575 | 4575 | DETAIL: NestLoop hint requires at least two relations. |
4576 | 4576 | LOG: pg_hint_plan: |
4577 | 4577 | used hint: |
@@ -4587,7 +4587,7 @@ NestLoop() | ||
4587 | 4587 | -- No. J-3-4-8 |
4588 | 4588 | /*+NestLoop(t1)*/ |
4589 | 4589 | 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 "" | |
4591 | 4591 | DETAIL: NestLoop hint requires at least two relations. |
4592 | 4592 | LOG: pg_hint_plan: |
4593 | 4593 | used hint: |
@@ -270,7 +270,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 WHERE s1.t1.c1 = | ||
270 | 270 | |
271 | 271 | /*+Leading(t1 t2 t3 t1)*/ |
272 | 272 | 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)" | |
274 | 274 | DETAIL: Relation name "t1" is ambiguous. |
275 | 275 | LOG: pg_hint_plan: |
276 | 276 | used hint: |
@@ -513,7 +513,7 @@ error hint: | ||
513 | 513 | -- No. L-1-5-2 |
514 | 514 | /*+Leading(t4 t2 t3 t1 t4)*/ |
515 | 515 | 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)" | |
517 | 517 | DETAIL: Relation name "t4" is duplicated. |
518 | 518 | LOG: pg_hint_plan: |
519 | 519 | used hint: |
@@ -540,7 +540,7 @@ Leading(t4 t2 t3 t1 t4) | ||
540 | 540 | |
541 | 541 | /*+Leading(t4 t2 t3 t4)*/ |
542 | 542 | 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)" | |
544 | 544 | DETAIL: Relation name "t4" is duplicated. |
545 | 545 | LOG: pg_hint_plan: |
546 | 546 | used hint: |
@@ -568,7 +568,7 @@ Leading(t4 t2 t3 t4) | ||
568 | 568 | -- No. L-1-5-3 |
569 | 569 | /*+Leading(t4 t2 t3 t1 t4 t2 t3 t1)*/ |
570 | 570 | 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)" | |
572 | 572 | DETAIL: Relation name "t4" is duplicated. |
573 | 573 | LOG: pg_hint_plan: |
574 | 574 | used hint: |
@@ -595,7 +595,7 @@ Leading(t4 t2 t3 t1 t4 t2 t3 t1) | ||
595 | 595 | |
596 | 596 | /*+Leading(t4 t2 t2 t4)*/ |
597 | 597 | 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)" | |
599 | 599 | DETAIL: Relation name "t2" is duplicated. |
600 | 600 | LOG: pg_hint_plan: |
601 | 601 | used hint: |
@@ -3465,7 +3465,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1; | ||
3465 | 3465 | |
3466 | 3466 | /*+Leading(v1t1 v1t1)*/ |
3467 | 3467 | 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)" | |
3469 | 3469 | DETAIL: Relation name "v1t1" is ambiguous. |
3470 | 3470 | LOG: pg_hint_plan: |
3471 | 3471 | used hint: |
@@ -3525,7 +3525,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1; | ||
3525 | 3525 | |
3526 | 3526 | /*+Leading(r4t1 r4t1)*/ |
3527 | 3527 | 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)" | |
3529 | 3529 | DETAIL: Relation name "r4t1" is ambiguous. |
3530 | 3530 | LOG: pg_hint_plan: |
3531 | 3531 | used hint: |
@@ -3673,7 +3673,7 @@ error hint: | ||
3673 | 3673 | |
3674 | 3674 | /*+ Leading(*VALUES* t3 t2 t1) */ |
3675 | 3675 | 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) " | |
3677 | 3677 | DETAIL: Relation name "*VALUES*" is ambiguous. |
3678 | 3678 | LOG: pg_hint_plan: |
3679 | 3679 | used hint: |
@@ -4095,7 +4095,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 | ||
4095 | 4095 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 |
4096 | 4096 | JOIN s1.t2 ON (t1.c1 = t2.c1) |
4097 | 4097 | 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)" | |
4099 | 4099 | DETAIL: Conflict leading hint. |
4100 | 4100 | LOG: pg_hint_plan: |
4101 | 4101 | used hint: |
@@ -4124,9 +4124,9 @@ error hint: | ||
4124 | 4124 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 |
4125 | 4125 | JOIN s1.t2 ON (t1.c1 = t2.c1) |
4126 | 4126 | 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)" | |
4128 | 4128 | 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)" | |
4130 | 4130 | DETAIL: Conflict leading hint. |
4131 | 4131 | LOG: pg_hint_plan: |
4132 | 4132 | used hint: |
@@ -4156,7 +4156,7 @@ error hint: | ||
4156 | 4156 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 |
4157 | 4157 | JOIN s1.t2 ON (t1.c1 = t2.c1) |
4158 | 4158 | 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()" | |
4160 | 4160 | DETAIL: Leading hint requires at least two relations. |
4161 | 4161 | LOG: pg_hint_plan: |
4162 | 4162 | used hint: |
@@ -4185,9 +4185,9 @@ Leading() | ||
4185 | 4185 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 |
4186 | 4186 | JOIN s1.t2 ON (t1.c1 = t2.c1) |
4187 | 4187 | 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()" | |
4189 | 4189 | 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()" | |
4191 | 4191 | DETAIL: Conflict leading hint. |
4192 | 4192 | LOG: pg_hint_plan: |
4193 | 4193 | used hint: |
@@ -4220,7 +4220,7 @@ Leading() | ||
4220 | 4220 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 |
4221 | 4221 | JOIN s1.t2 ON (t1.c1 = t2.c1) |
4222 | 4222 | 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()" | |
4224 | 4224 | DETAIL: Leading hint requires at least two relations. |
4225 | 4225 | LOG: pg_hint_plan: |
4226 | 4226 | used hint: |
@@ -4247,7 +4247,7 @@ Leading() | ||
4247 | 4247 | EXPLAIN (COSTS false) SELECT * FROM s1.t1 |
4248 | 4248 | JOIN s1.t2 ON (t1.c1 = t2.c1) |
4249 | 4249 | 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)" | |
4251 | 4251 | DETAIL: Leading hint requires at least two relations. |
4252 | 4252 | LOG: pg_hint_plan: |
4253 | 4253 | used hint: |
@@ -4326,7 +4326,7 @@ error hint: | ||
4326 | 4326 | -- No. L-3-6-1 |
4327 | 4327 | /*+Leading((t2))*/ |
4328 | 4328 | 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))" | |
4330 | 4330 | DETAIL: Leading hint requires two sets of relations when parentheses nests. |
4331 | 4331 | LOG: pg_hint_plan: |
4332 | 4332 | used hint: |
@@ -4380,7 +4380,7 @@ error hint: | ||
4380 | 4380 | -- No. L-3-6-3 |
4381 | 4381 | /*+Leading((t2 t3 t4))*/ |
4382 | 4382 | 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))" | |
4384 | 4384 | DETAIL: Leading hint requires two sets of relations when parentheses nests. |
4385 | 4385 | LOG: pg_hint_plan: |
4386 | 4386 | used hint: |
@@ -4436,7 +4436,7 @@ error hint: | ||
4436 | 4436 | -- No. L-3-6-5 |
4437 | 4437 | /*+Leading((((t1 t3) t4) t2)))*/ |
4438 | 4438 | 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 ")" | |
4440 | 4440 | DETAIL: Unrecognized hint keyword ")". |
4441 | 4441 | LOG: pg_hint_plan: |
4442 | 4442 | used hint: |
@@ -137,7 +137,7 @@ error hint: | ||
137 | 137 | EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1; |
138 | 138 | /*+Rows(t1 t1 #1)*/ |
139 | 139 | 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)" | |
141 | 141 | DETAIL: Relation name "t1" is ambiguous. |
142 | 142 | LOG: pg_hint_plan: |
143 | 143 | used hint: |
@@ -214,7 +214,7 @@ error hint: | ||
214 | 214 | \o results/R_1-5-2.out.log |
215 | 215 | /*+Rows(t1 t1 #1)*/ |
216 | 216 | 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)" | |
218 | 218 | DETAIL: Relation name "t1" is duplicated. |
219 | 219 | LOG: pg_hint_plan: |
220 | 220 | used hint: |
@@ -230,12 +230,12 @@ Rows(t1 t1 #1) | ||
230 | 230 | \o results/R_1-5-3.out.log |
231 | 231 | /*+(t1 t1)(t2 t2)*/ |
232 | 232 | 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)" | |
234 | 234 | DETAIL: Unrecognized hint keyword "". |
235 | 235 | EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1; |
236 | 236 | /*+(t1 t2 t1 t2)*/ |
237 | 237 | 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)" | |
239 | 239 | DETAIL: Unrecognized hint keyword "". |
240 | 240 | \o |
241 | 241 | \! 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: | ||
482 | 482 | \o results/R_1-7-1.out.log |
483 | 483 | /*+Rows(t1 #1)*/ |
484 | 484 | 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 "" | |
486 | 486 | DETAIL: Rows hint requires at least two relations. |
487 | 487 | LOG: pg_hint_plan: |
488 | 488 | used hint: |
@@ -498,7 +498,7 @@ Rows(t1 #1) | ||
498 | 498 | \o results/R_1-7-2.out.log |
499 | 499 | /*+Rows(t1 t2 1)*/ |
500 | 500 | 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" | |
502 | 502 | DETAIL: Unrecognized rows value type notation. |
503 | 503 | LOG: pg_hint_plan: |
504 | 504 | used hint: |
@@ -514,7 +514,7 @@ Rows(t1 t2 1) | ||
514 | 514 | \o results/R_1-7-3.out.log |
515 | 515 | /*+Rows(t1 t2 #notrows)*/ |
516 | 516 | 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" | |
518 | 518 | DETAIL: Rows hint requires valid number as rows estimation. |
519 | 519 | LOG: pg_hint_plan: |
520 | 520 | used hint: |
@@ -1964,7 +1964,7 @@ error hint: | ||
1964 | 1964 | \o results/R_2-3-4.out.log |
1965 | 1965 | /*+HashJoin(v1t1 v1t1)*/ |
1966 | 1966 | 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)" | |
1968 | 1968 | DETAIL: Relation name "v1t1" is ambiguous. |
1969 | 1969 | LOG: pg_hint_plan: |
1970 | 1970 | used hint: |
@@ -1975,9 +1975,9 @@ HashJoin(v1t1 v1t1) | ||
1975 | 1975 | |
1976 | 1976 | /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/ |
1977 | 1977 | 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)" | |
1979 | 1979 | 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)" | |
1981 | 1981 | DETAIL: Relation name "v1t1" is ambiguous. |
1982 | 1982 | LOG: pg_hint_plan: |
1983 | 1983 | used hint: |
@@ -2018,11 +2018,11 @@ error hint: | ||
2018 | 2018 | \o results/R_2-3-6.out.log |
2019 | 2019 | /*+RowsHashJoin(r4t1 r4t1)*/ |
2020 | 2020 | 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)" | |
2022 | 2022 | DETAIL: Unrecognized hint keyword "RowsHashJoin". |
2023 | 2023 | /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/ |
2024 | 2024 | 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)" | |
2026 | 2026 | DETAIL: Unrecognized hint keyword "RowsHashJoin". |
2027 | 2027 | \o |
2028 | 2028 | \! 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: | ||
2099 | 2099 | |
2100 | 2100 | /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/ |
2101 | 2101 | 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)" | |
2103 | 2103 | 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)" | |
2105 | 2105 | 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)" | |
2107 | 2107 | DETAIL: Relation name "*VALUES*" is ambiguous. |
2108 | 2108 | LOG: pg_hint_plan: |
2109 | 2109 | used hint: |
@@ -2343,7 +2343,7 @@ error hint: | ||
2343 | 2343 | EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; |
2344 | 2344 | /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/ |
2345 | 2345 | 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)" | |
2347 | 2347 | DETAIL: Conflict rows hint. |
2348 | 2348 | LOG: pg_hint_plan: |
2349 | 2349 | used hint: |
@@ -2361,9 +2361,9 @@ error hint: | ||
2361 | 2361 | EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; |
2362 | 2362 | /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/ |
2363 | 2363 | 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)" | |
2365 | 2365 | 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)" | |
2367 | 2367 | DETAIL: Conflict rows hint. |
2368 | 2368 | LOG: pg_hint_plan: |
2369 | 2369 | used hint: |
@@ -2382,7 +2382,7 @@ error hint: | ||
2382 | 2382 | EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; |
2383 | 2383 | /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/ |
2384 | 2384 | 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)" | |
2386 | 2386 | DETAIL: Conflict rows hint. |
2387 | 2387 | LOG: pg_hint_plan: |
2388 | 2388 | used hint: |
@@ -2400,9 +2400,9 @@ error hint: | ||
2400 | 2400 | EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; |
2401 | 2401 | /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/ |
2402 | 2402 | 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)" | |
2404 | 2404 | 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)" | |
2406 | 2406 | DETAIL: Conflict rows hint. |
2407 | 2407 | LOG: pg_hint_plan: |
2408 | 2408 | used hint: |
@@ -3023,7 +3023,7 @@ EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4), | ||
3023 | 3023 | |
3024 | 3024 | /*+SeqScan(t1 t2)*/ |
3025 | 3025 | 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 "" | |
3027 | 3027 | DETAIL: SeqScan hint accepts only one relation. |
3028 | 3028 | LOG: pg_hint_plan: |
3029 | 3029 | used hint: |
@@ -5327,7 +5327,7 @@ error hint: | ||
5327 | 5327 | -- No. S-3-12-1 |
5328 | 5328 | /*+IndexScan(ti1) BitmapScan(ti1)*/ |
5329 | 5329 | 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)" | |
5331 | 5331 | DETAIL: Conflict scan method hint. |
5332 | 5332 | LOG: pg_hint_plan: |
5333 | 5333 | used hint: |
@@ -5349,7 +5349,7 @@ error hint: | ||
5349 | 5349 | -- No. S-3-12-2 |
5350 | 5350 | /*+IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/ |
5351 | 5351 | 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)" | |
5353 | 5353 | DETAIL: Conflict scan method hint. |
5354 | 5354 | LOG: available indexes for BitmapScan(ti1): ti1_btree |
5355 | 5355 | LOG: pg_hint_plan: |
@@ -5372,9 +5372,9 @@ error hint: | ||
5372 | 5372 | -- No. S-3-12-3 |
5373 | 5373 | /*+BitmapScan(ti1) IndexScan(ti1) BitmapScan(ti1)*/ |
5374 | 5374 | 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)" | |
5376 | 5376 | 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)" | |
5378 | 5378 | DETAIL: Conflict scan method hint. |
5379 | 5379 | LOG: pg_hint_plan: |
5380 | 5380 | used hint: |
@@ -5397,9 +5397,9 @@ error hint: | ||
5397 | 5397 | -- No. S-3-12-4 |
5398 | 5398 | /*+BitmapScan(ti1 ti1_hash) IndexScan(ti1 ti1_pkey) BitmapScan(ti1 ti1_btree)*/ |
5399 | 5399 | 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)" | |
5401 | 5401 | 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)" | |
5403 | 5403 | DETAIL: Conflict scan method hint. |
5404 | 5404 | LOG: available indexes for BitmapScan(ti1): ti1_btree |
5405 | 5405 | LOG: pg_hint_plan: |
@@ -5442,7 +5442,7 @@ error hint: | ||
5442 | 5442 | -- No. S-3-13-2 |
5443 | 5443 | /*+SeqScan(ti1 ti1_pkey)*/ |
5444 | 5444 | 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 "" | |
5446 | 5446 | DETAIL: SeqScan hint accepts only one relation. |
5447 | 5447 | LOG: pg_hint_plan: |
5448 | 5448 | used hint: |
@@ -5461,7 +5461,7 @@ SeqScan(ti1 ti1_pkey) | ||
5461 | 5461 | -- No. S-3-13-3 |
5462 | 5462 | /*+SeqScan(ti1 ti1_pkey ti1_btree)*/ |
5463 | 5463 | 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 "" | |
5465 | 5465 | DETAIL: SeqScan hint accepts only one relation. |
5466 | 5466 | LOG: pg_hint_plan: |
5467 | 5467 | used hint: |
@@ -5609,7 +5609,7 @@ error hint: | ||
5609 | 5609 | -- No. S-3-13-11 |
5610 | 5610 | /*+TidScan(ti1 ti1_pkey)*/ |
5611 | 5611 | 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 "" | |
5613 | 5613 | DETAIL: TidScan hint accepts only one relation. |
5614 | 5614 | LOG: pg_hint_plan: |
5615 | 5615 | used hint: |
@@ -5628,7 +5628,7 @@ TidScan(ti1 ti1_pkey) | ||
5628 | 5628 | -- No. S-3-13-12 |
5629 | 5629 | /*+TidScan(ti1 ti1_pkey ti1_btree)*/ |
5630 | 5630 | 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 "" | |
5632 | 5632 | DETAIL: TidScan hint accepts only one relation. |
5633 | 5633 | LOG: pg_hint_plan: |
5634 | 5634 | used hint: |
@@ -5664,7 +5664,7 @@ error hint: | ||
5664 | 5664 | -- No. S-3-13-14 |
5665 | 5665 | /*+NoSeqScan(ti1 ti1_pkey)*/ |
5666 | 5666 | 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 "" | |
5668 | 5668 | DETAIL: NoSeqScan hint accepts only one relation. |
5669 | 5669 | LOG: pg_hint_plan: |
5670 | 5670 | used hint: |
@@ -5683,7 +5683,7 @@ NoSeqScan(ti1 ti1_pkey) | ||
5683 | 5683 | -- No. S-3-13-15 |
5684 | 5684 | /*+NoSeqScan(ti1 ti1_pkey ti1_btree)*/ |
5685 | 5685 | 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 "" | |
5687 | 5687 | DETAIL: NoSeqScan hint accepts only one relation. |
5688 | 5688 | LOG: pg_hint_plan: |
5689 | 5689 | used hint: |
@@ -5719,7 +5719,7 @@ error hint: | ||
5719 | 5719 | -- No. S-3-13-17 |
5720 | 5720 | /*+NoIndexScan(ti1 ti1_pkey)*/ |
5721 | 5721 | 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 "" | |
5723 | 5723 | DETAIL: NoIndexScan hint accepts only one relation. |
5724 | 5724 | LOG: pg_hint_plan: |
5725 | 5725 | used hint: |
@@ -5738,7 +5738,7 @@ NoIndexScan(ti1 ti1_pkey) | ||
5738 | 5738 | -- No. S-3-13-18 |
5739 | 5739 | /*+NoIndexScan(ti1 ti1_pkey ti1_btree)*/ |
5740 | 5740 | 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 "" | |
5742 | 5742 | DETAIL: NoIndexScan hint accepts only one relation. |
5743 | 5743 | LOG: pg_hint_plan: |
5744 | 5744 | used hint: |
@@ -5774,7 +5774,7 @@ error hint: | ||
5774 | 5774 | -- No. S-3-13-20 |
5775 | 5775 | /*+NoBitmapScan(ti1 ti1_pkey)*/ |
5776 | 5776 | 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 "" | |
5778 | 5778 | DETAIL: NoBitmapScan hint accepts only one relation. |
5779 | 5779 | LOG: pg_hint_plan: |
5780 | 5780 | used hint: |
@@ -5793,7 +5793,7 @@ NoBitmapScan(ti1 ti1_pkey) | ||
5793 | 5793 | -- No. S-3-13-21 |
5794 | 5794 | /*+NoBitmapScan(ti1 ti1_pkey ti1_btree)*/ |
5795 | 5795 | 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 "" | |
5797 | 5797 | DETAIL: NoBitmapScan hint accepts only one relation. |
5798 | 5798 | LOG: pg_hint_plan: |
5799 | 5799 | used hint: |
@@ -5829,7 +5829,7 @@ error hint: | ||
5829 | 5829 | -- No. S-3-13-23 |
5830 | 5830 | /*+NoTidScan(ti1 ti1_pkey)*/ |
5831 | 5831 | 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 "" | |
5833 | 5833 | DETAIL: NoTidScan hint accepts only one relation. |
5834 | 5834 | LOG: pg_hint_plan: |
5835 | 5835 | used hint: |
@@ -5848,7 +5848,7 @@ NoTidScan(ti1 ti1_pkey) | ||
5848 | 5848 | -- No. S-3-13-24 |
5849 | 5849 | /*+NoTidScan(ti1 ti1_pkey ti1_btree)*/ |
5850 | 5850 | 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 "" | |
5852 | 5852 | DETAIL: NoTidScan hint accepts only one relation. |
5853 | 5853 | LOG: pg_hint_plan: |
5854 | 5854 | used hint: |
@@ -5933,7 +5933,7 @@ error hint: | ||
5933 | 5933 | -- No. S-3-13-29 |
5934 | 5934 | /*+NoIndexOnlyScan(ti1 ti1_pkey)*/ |
5935 | 5935 | 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 "" | |
5937 | 5937 | DETAIL: NoIndexOnlyScan hint accepts only one relation. |
5938 | 5938 | LOG: pg_hint_plan: |
5939 | 5939 | used hint: |
@@ -5951,7 +5951,7 @@ NoIndexOnlyScan(ti1 ti1_pkey) | ||
5951 | 5951 | -- No. S-3-13-30 |
5952 | 5952 | /*+NoIndexOnlyScan(ti1 ti1_pkey ti1_btree)*/ |
5953 | 5953 | 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 "" | |
5955 | 5955 | DETAIL: NoIndexOnlyScan hint accepts only one relation. |
5956 | 5956 | LOG: pg_hint_plan: |
5957 | 5957 | used hint: |
@@ -90,8 +90,9 @@ PG_MODULE_MAGIC; | ||
90 | 90 | #define HINT_ARRAY_DEFAULT_INITSIZE 8 |
91 | 91 | |
92 | 92 | #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)), \ | |
95 | 96 | errdetail detail)) |
96 | 97 | |
97 | 98 | #define skip_space(str) \ |
@@ -156,7 +157,7 @@ typedef Hint *(*HintCreateFunction) (const char *hint_str, | ||
156 | 157 | const char *keyword, |
157 | 158 | HintKeyword hint_keyword); |
158 | 159 | typedef void (*HintDeleteFunction) (Hint *hint); |
159 | -typedef void (*HintDescFunction) (Hint *hint, StringInfo buf); | |
160 | +typedef void (*HintDescFunction) (Hint *hint, StringInfo buf, bool nolf); | |
160 | 161 | typedef int (*HintCmpFunction) (const Hint *a, const Hint *b); |
161 | 162 | typedef const char *(*HintParseFunction) (Hint *hint, HintState *hstate, |
162 | 163 | Query *parse, const char *str); |
@@ -193,6 +194,9 @@ typedef enum HintStatus | ||
193 | 194 | #define hint_state_enabled(hint) ((hint)->base.state == HINT_STATE_NOTUSED || \ |
194 | 195 | (hint)->base.state == HINT_STATE_USED) |
195 | 196 | |
197 | +static unsigned int qno = 0; | |
198 | +static char qnostr[32]; | |
199 | + | |
196 | 200 | /* common data for all hints. */ |
197 | 201 | struct Hint |
198 | 202 | { |
@@ -357,35 +361,35 @@ static RelOptInfo *pg_hint_plan_join_search(PlannerInfo *root, | ||
357 | 361 | static Hint *ScanMethodHintCreate(const char *hint_str, const char *keyword, |
358 | 362 | HintKeyword hint_keyword); |
359 | 363 | static void ScanMethodHintDelete(ScanMethodHint *hint); |
360 | -static void ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf); | |
364 | +static void ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf, bool nolf); | |
361 | 365 | static int ScanMethodHintCmp(const ScanMethodHint *a, const ScanMethodHint *b); |
362 | 366 | static const char *ScanMethodHintParse(ScanMethodHint *hint, HintState *hstate, |
363 | 367 | Query *parse, const char *str); |
364 | 368 | static Hint *JoinMethodHintCreate(const char *hint_str, const char *keyword, |
365 | 369 | HintKeyword hint_keyword); |
366 | 370 | static void JoinMethodHintDelete(JoinMethodHint *hint); |
367 | -static void JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf); | |
371 | +static void JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf, bool nolf); | |
368 | 372 | static int JoinMethodHintCmp(const JoinMethodHint *a, const JoinMethodHint *b); |
369 | 373 | static const char *JoinMethodHintParse(JoinMethodHint *hint, HintState *hstate, |
370 | 374 | Query *parse, const char *str); |
371 | 375 | static Hint *LeadingHintCreate(const char *hint_str, const char *keyword, |
372 | 376 | HintKeyword hint_keyword); |
373 | 377 | static void LeadingHintDelete(LeadingHint *hint); |
374 | -static void LeadingHintDesc(LeadingHint *hint, StringInfo buf); | |
378 | +static void LeadingHintDesc(LeadingHint *hint, StringInfo buf, bool nolf); | |
375 | 379 | static int LeadingHintCmp(const LeadingHint *a, const LeadingHint *b); |
376 | 380 | static const char *LeadingHintParse(LeadingHint *hint, HintState *hstate, |
377 | 381 | Query *parse, const char *str); |
378 | 382 | static Hint *SetHintCreate(const char *hint_str, const char *keyword, |
379 | 383 | HintKeyword hint_keyword); |
380 | 384 | static void SetHintDelete(SetHint *hint); |
381 | -static void SetHintDesc(SetHint *hint, StringInfo buf); | |
385 | +static void SetHintDesc(SetHint *hint, StringInfo buf, bool nolf); | |
382 | 386 | static int SetHintCmp(const SetHint *a, const SetHint *b); |
383 | 387 | static const char *SetHintParse(SetHint *hint, HintState *hstate, Query *parse, |
384 | 388 | const char *str); |
385 | 389 | static Hint *RowsHintCreate(const char *hint_str, const char *keyword, |
386 | 390 | HintKeyword hint_keyword); |
387 | 391 | static void RowsHintDelete(RowsHint *hint); |
388 | -static void RowsHintDesc(RowsHint *hint, StringInfo buf); | |
392 | +static void RowsHintDesc(RowsHint *hint, StringInfo buf, bool nolf); | |
389 | 393 | static int RowsHintCmp(const RowsHint *a, const RowsHint *b); |
390 | 394 | static const char *RowsHintParse(RowsHint *hint, HintState *hstate, |
391 | 395 | Query *parse, const char *str); |
@@ -426,10 +430,11 @@ static void pg_hint_plan_plpgsql_stmt_end(PLpgSQL_execstate *estate, | ||
426 | 430 | |
427 | 431 | /* GUC variables */ |
428 | 432 | 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; | |
431 | 435 | /* Default is off, to keep backward compatibility. */ |
432 | 436 | static bool pg_hint_plan_enable_hint_table = false; |
437 | +static bool hidestmt = false; | |
433 | 438 | |
434 | 439 | static const struct config_enum_entry parse_messages_level_options[] = { |
435 | 440 | {"debug", DEBUG2, true}, |
@@ -450,6 +455,22 @@ static const struct config_enum_entry parse_messages_level_options[] = { | ||
450 | 455 | {NULL, 0, false} |
451 | 456 | }; |
452 | 457 | |
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 | + | |
453 | 474 | /* Saved hook values in case of unload */ |
454 | 475 | static ProcessUtility_hook_type prev_ProcessUtility = NULL; |
455 | 476 | static planner_hook_type prev_planner = NULL; |
@@ -537,12 +558,13 @@ _PG_init(void) | ||
537 | 558 | NULL, |
538 | 559 | NULL); |
539 | 560 | |
540 | - DefineCustomBoolVariable("pg_hint_plan.debug_print", | |
561 | + DefineCustomEnumVariable("pg_hint_plan.debug_print", | |
541 | 562 | "Logs results of hint parsing.", |
542 | 563 | 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, | |
546 | 568 | 0, |
547 | 569 | NULL, |
548 | 570 | NULL, |
@@ -551,7 +573,19 @@ _PG_init(void) | ||
551 | 573 | DefineCustomEnumVariable("pg_hint_plan.parse_messages", |
552 | 574 | "Message level of parse errors.", |
553 | 575 | 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, | |
555 | 589 | INFO, |
556 | 590 | parse_messages_level_options, |
557 | 591 | PGC_USERSET, |
@@ -890,7 +924,7 @@ quote_value(StringInfo buf, const char *value) | ||
890 | 924 | } |
891 | 925 | |
892 | 926 | static void |
893 | -ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf) | |
927 | +ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf, bool nolf) | |
894 | 928 | { |
895 | 929 | ListCell *l; |
896 | 930 |
@@ -904,11 +938,13 @@ ScanMethodHintDesc(ScanMethodHint *hint, StringInfo buf) | ||
904 | 938 | quote_value(buf, (char *) lfirst(l)); |
905 | 939 | } |
906 | 940 | } |
907 | - appendStringInfoString(buf, ")\n"); | |
941 | + appendStringInfoString(buf, ")"); | |
942 | + if (!nolf) | |
943 | + appendStringInfoChar(buf, '\n'); | |
908 | 944 | } |
909 | 945 | |
910 | 946 | static void |
911 | -JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf) | |
947 | +JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf, bool nolf) | |
912 | 948 | { |
913 | 949 | int i; |
914 | 950 |
@@ -922,7 +958,9 @@ JoinMethodHintDesc(JoinMethodHint *hint, StringInfo buf) | ||
922 | 958 | quote_value(buf, hint->relnames[i]); |
923 | 959 | } |
924 | 960 | } |
925 | - appendStringInfoString(buf, ")\n"); | |
961 | + appendStringInfoString(buf, ")"); | |
962 | + if (!nolf) | |
963 | + appendStringInfoChar(buf, '\n'); | |
926 | 964 | |
927 | 965 | } |
928 | 966 |
@@ -954,7 +992,7 @@ OuterInnerDesc(OuterInnerRels *outer_inner, StringInfo buf) | ||
954 | 992 | } |
955 | 993 | |
956 | 994 | static void |
957 | -LeadingHintDesc(LeadingHint *hint, StringInfo buf) | |
995 | +LeadingHintDesc(LeadingHint *hint, StringInfo buf, bool nolf) | |
958 | 996 | { |
959 | 997 | appendStringInfo(buf, "%s(", HINT_LEADING); |
960 | 998 | if (hint->outer_inner == NULL) |
@@ -977,11 +1015,13 @@ LeadingHintDesc(LeadingHint *hint, StringInfo buf) | ||
977 | 1015 | else |
978 | 1016 | OuterInnerDesc(hint->outer_inner, buf); |
979 | 1017 | |
980 | - appendStringInfoString(buf, ")\n"); | |
1018 | + appendStringInfoString(buf, ")"); | |
1019 | + if (!nolf) | |
1020 | + appendStringInfoChar(buf, '\n'); | |
981 | 1021 | } |
982 | 1022 | |
983 | 1023 | static void |
984 | -SetHintDesc(SetHint *hint, StringInfo buf) | |
1024 | +SetHintDesc(SetHint *hint, StringInfo buf, bool nolf) | |
985 | 1025 | { |
986 | 1026 | bool is_first = true; |
987 | 1027 | ListCell *l; |
@@ -996,11 +1036,13 @@ SetHintDesc(SetHint *hint, StringInfo buf) | ||
996 | 1036 | |
997 | 1037 | quote_value(buf, (char *) lfirst(l)); |
998 | 1038 | } |
999 | - appendStringInfo(buf, ")\n"); | |
1039 | + appendStringInfo(buf, ")"); | |
1040 | + if (!nolf) | |
1041 | + appendStringInfoChar(buf, '\n'); | |
1000 | 1042 | } |
1001 | 1043 | |
1002 | 1044 | static void |
1003 | -RowsHintDesc(RowsHint *hint, StringInfo buf) | |
1045 | +RowsHintDesc(RowsHint *hint, StringInfo buf, bool nolf) | |
1004 | 1046 | { |
1005 | 1047 | int i; |
1006 | 1048 |
@@ -1015,8 +1057,9 @@ RowsHintDesc(RowsHint *hint, StringInfo buf) | ||
1015 | 1057 | } |
1016 | 1058 | } |
1017 | 1059 | appendStringInfo(buf, " %s", hint->rows_str); |
1018 | - appendStringInfoString(buf, ")\n"); | |
1019 | - | |
1060 | + appendStringInfoString(buf, ")"); | |
1061 | + if (!nolf) | |
1062 | + appendStringInfoChar(buf, '\n'); | |
1020 | 1063 | } |
1021 | 1064 | |
1022 | 1065 | /* |
@@ -1025,18 +1068,26 @@ RowsHintDesc(RowsHint *hint, StringInfo buf) | ||
1025 | 1068 | */ |
1026 | 1069 | static void |
1027 | 1070 | desc_hint_in_state(HintState *hstate, StringInfo buf, const char *title, |
1028 | - HintStatus state) | |
1071 | + HintStatus state, bool nolf) | |
1029 | 1072 | { |
1030 | - int i; | |
1073 | + int i, nshown; | |
1031 | 1074 | |
1032 | - appendStringInfo(buf, "%s:\n", title); | |
1075 | + appendStringInfo(buf, "%s:", title); | |
1076 | + if (!nolf) | |
1077 | + appendStringInfoChar(buf, '\n'); | |
1078 | + | |
1079 | + nshown = 0; | |
1033 | 1080 | for (i = 0; i < hstate->nall_hints; i++) |
1034 | 1081 | { |
1035 | 1082 | if (hstate->all_hints[i]->state != state) |
1036 | 1083 | continue; |
1037 | 1084 | |
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++; | |
1039 | 1087 | } |
1088 | + | |
1089 | + if (nolf && nshown == 0) | |
1090 | + appendStringInfoString(buf, "(none)"); | |
1040 | 1091 | } |
1041 | 1092 | |
1042 | 1093 | /* |
@@ -1056,16 +1107,43 @@ HintStateDump(HintState *hstate) | ||
1056 | 1107 | initStringInfo(&buf); |
1057 | 1108 | |
1058 | 1109 | 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); | |
1063 | 1114 | |
1064 | 1115 | elog(LOG, "%s", buf.data); |
1065 | 1116 | |
1066 | 1117 | pfree(buf.data); |
1067 | 1118 | } |
1068 | 1119 | |
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 | + | |
1069 | 1147 | /* |
1070 | 1148 | * compare functions |
1071 | 1149 | */ |
@@ -2142,10 +2220,12 @@ set_config_option_wrapper(const char *name, const char *value, | ||
2142 | 2220 | errdata = CopyErrorData(); |
2143 | 2221 | FlushErrorState(); |
2144 | 2222 | |
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)); | |
2149 | 2229 | FreeErrorData(errdata); |
2150 | 2230 | } |
2151 | 2231 | PG_END_TRY(); |
@@ -2171,7 +2251,7 @@ set_config_options(SetHint **options, int noptions, GucContext context) | ||
2171 | 2251 | |
2172 | 2252 | result = set_config_option_wrapper(hint->name, hint->value, context, |
2173 | 2253 | PGC_S_SESSION, GUC_ACTION_SAVE, true, |
2174 | - pg_hint_plan_parse_messages); | |
2254 | + pg_hint_plan_message_level); | |
2175 | 2255 | if (result != 0) |
2176 | 2256 | hint->base.state = HINT_STATE_USED; |
2177 | 2257 | else |
@@ -2239,6 +2319,10 @@ pg_hint_plan_ProcessUtility(Node *parsetree, const char *queryString, | ||
2239 | 2319 | */ |
2240 | 2320 | if (!pg_hint_plan_enable_hint || nested_level > 0) |
2241 | 2321 | { |
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"))); | |
2242 | 2326 | if (prev_ProcessUtility) |
2243 | 2327 | (*prev_ProcessUtility) (parsetree, queryString, params, |
2244 | 2328 | isTopLevel, dest, completionTag); |
@@ -2303,6 +2387,11 @@ pg_hint_plan_ProcessUtility(Node *parsetree, const char *queryString, | ||
2303 | 2387 | |
2304 | 2388 | if (stmt_name) |
2305 | 2389 | { |
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))); | |
2306 | 2395 | PG_TRY(); |
2307 | 2396 | { |
2308 | 2397 | if (prev_ProcessUtility) |
@@ -2377,6 +2466,13 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) | ||
2377 | 2466 | int save_nestlevel; |
2378 | 2467 | PlannedStmt *result; |
2379 | 2468 | 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; | |
2380 | 2476 | |
2381 | 2477 | /* |
2382 | 2478 | * 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) | ||
2384 | 2480 | * plan with current_hint if any, so set it to NULL. |
2385 | 2481 | */ |
2386 | 2482 | 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 | + | |
2387 | 2491 | goto standard_planner_proc; |
2492 | + } | |
2388 | 2493 | |
2389 | 2494 | /* Create hint struct from client-supplied query string. */ |
2390 | 2495 | query = get_query_string(); |
@@ -2429,12 +2534,41 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) | ||
2429 | 2534 | &query_len, |
2430 | 2535 | GetDatabaseEncoding()); |
2431 | 2536 | 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 | + } | |
2435 | 2555 | } |
2436 | 2556 | if (hints == NULL) |
2557 | + { | |
2437 | 2558 | 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 | + | |
2438 | 2572 | hstate = create_hintstate(parse, hints); |
2439 | 2573 | |
2440 | 2574 | /* |
@@ -2472,6 +2606,14 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) | ||
2472 | 2606 | if (enable_hashjoin) |
2473 | 2607 | current_hint->init_join_mask |= ENABLE_HASHJOIN; |
2474 | 2608 | |
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 | + } | |
2475 | 2617 | /* |
2476 | 2618 | * Use PG_TRY mechanism to recover GUC parameters and current_hint to the |
2477 | 2619 | * state when this planner started when error occurred in planner. |
@@ -2496,8 +2638,10 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) | ||
2496 | 2638 | PG_END_TRY(); |
2497 | 2639 | |
2498 | 2640 | /* Print hint in debug mode. */ |
2499 | - if (pg_hint_plan_debug_print) | |
2641 | + if (debug_level == 1) | |
2500 | 2642 | HintStateDump(current_hint); |
2643 | + else if (debug_level == 2) | |
2644 | + HintStateDump2(current_hint); | |
2501 | 2645 | |
2502 | 2646 | /* |
2503 | 2647 | * 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) | ||
2509 | 2653 | return result; |
2510 | 2654 | |
2511 | 2655 | 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 | + } | |
2512 | 2664 | current_hint = NULL; |
2513 | 2665 | if (prev_planner) |
2514 | 2666 | return (*prev_planner) (parse, cursorOptions, boundParams); |
@@ -2615,7 +2767,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId) | ||
2615 | 2767 | * other than it. |
2616 | 2768 | */ |
2617 | 2769 | prev = NULL; |
2618 | - if (pg_hint_plan_debug_print) | |
2770 | + if (debug_level > 0) | |
2619 | 2771 | initStringInfo(&buf); |
2620 | 2772 | |
2621 | 2773 | for (cell = list_head(rel->indexlist); cell; cell = next) |
@@ -2640,7 +2792,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId) | ||
2640 | 2792 | if (result) |
2641 | 2793 | { |
2642 | 2794 | use_index = true; |
2643 | - if (pg_hint_plan_debug_print) | |
2795 | + if (debug_level > 0) | |
2644 | 2796 | { |
2645 | 2797 | appendStringInfoCharMacro(&buf, ' '); |
2646 | 2798 | quote_value(&buf, indexname); |
@@ -2799,7 +2951,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId) | ||
2799 | 2951 | use_index = true; |
2800 | 2952 | |
2801 | 2953 | /* to log the candidate of index */ |
2802 | - if (pg_hint_plan_debug_print) | |
2954 | + if (debug_level > 0) | |
2803 | 2955 | { |
2804 | 2956 | appendStringInfoCharMacro(&buf, ' '); |
2805 | 2957 | quote_value(&buf, indexname); |
@@ -2817,7 +2969,7 @@ delete_indexes(ScanMethodHint *hint, RelOptInfo *rel, Oid relationObjectId) | ||
2817 | 2969 | pfree(indexname); |
2818 | 2970 | } |
2819 | 2971 | |
2820 | - if (pg_hint_plan_debug_print) | |
2972 | + if (debug_level == 1) | |
2821 | 2973 | { |
2822 | 2974 | char *relname; |
2823 | 2975 | StringInfoData rel_buf; |
@@ -2934,8 +3086,20 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId, | ||
2934 | 3086 | * Do nothing if we don't have a valid hint in this context or current |
2935 | 3087 | * nesting depth is at SPI calls. |
2936 | 3088 | */ |
3089 | + | |
2937 | 3090 | 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))); | |
2938 | 3101 | return; |
3102 | + } | |
2939 | 3103 | |
2940 | 3104 | /* |
2941 | 3105 | * 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, | ||
2945 | 3109 | * called for them. |
2946 | 3110 | */ |
2947 | 3111 | 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))); | |
2948 | 3122 | return; |
3123 | + } | |
2949 | 3124 | |
2950 | 3125 | /* Find the parent for this relation */ |
2951 | 3126 | foreach (l, root->append_rel_list) |
@@ -3036,6 +3211,16 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId, | ||
3036 | 3211 | relationObjectId); |
3037 | 3212 | |
3038 | 3213 | /* 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))); | |
3039 | 3224 | return; |
3040 | 3225 | } |
3041 | 3226 |
@@ -3046,10 +3231,35 @@ pg_hint_plan_get_relation_info(PlannerInfo *root, Oid relationObjectId, | ||
3046 | 3231 | hint->base.state = HINT_STATE_USED; |
3047 | 3232 | |
3048 | 3233 | 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))); | |
3049 | 3246 | } |
3050 | 3247 | 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))); | |
3051 | 3260 | set_scan_config_options(current_hint->init_scan_mask, |
3052 | 3261 | current_hint->context); |
3262 | + } | |
3053 | 3263 | return; |
3054 | 3264 | } |
3055 | 3265 |