OSDN Git Service

試験項目表から削除した試験を、PG9.1用結果予測ファイルから削除した。
[pghintplan/pg_hint_plan.git] / expected / ut-A-9.1.out
1 LOAD 'pg_hint_plan';
2 SET pg_hint_plan.enable_hint TO on;
3 SET pg_hint_plan.debug_print TO on;
4 SET client_min_messages TO LOG;
5 SET search_path TO public;
6 ----
7 ---- No.A-1-1 install
8 ---- No.A-2-1 uninstall
9 ----
10
11 -- No.A-1-1-3
12
13 -- No.A-1-2-3
14
15 -- No.A-1-1-4
16
17 ----
18 ---- No. A-5-1 comment pattern
19 ----
20 -- No. A-5-1-1
21 /*+SeqScan(t1)*/
22 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
23 LOG:  pg_hint_plan:
24 used hint:
25 SeqScan(t1)
26 not used hint:
27 duplication hint:
28 error hint:
29
30      QUERY PLAN     
31 --------------------
32  Seq Scan on t1
33    Filter: (c1 = 1)
34 (2 rows)
35
36 -- No. A-5-1-2
37 /* +SeqScan(t1)*/
38 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
39           QUERY PLAN          
40 ------------------------------
41  Index Scan using t1_i1 on t1
42    Index Cond: (c1 = 1)
43 (2 rows)
44
45 -- No. A-5-1-3
46 --+SeqScan(t1)
47 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
48           QUERY PLAN          
49 ------------------------------
50  Index Scan using t1_i1 on t1
51    Index Cond: (c1 = 1)
52 (2 rows)
53
54 -- No. A-5-1-4
55 --+SeqScan(t1)
56 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
57           QUERY PLAN          
58 ------------------------------
59  Index Scan using t1_i1 on t1
60    Index Cond: (c1 = 1)
61 (2 rows)
62
63 -- No. A-5-1-5
64 -- +SeqScan(t1)
65 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
66           QUERY PLAN          
67 ------------------------------
68  Index Scan using t1_i1 on t1
69    Index Cond: (c1 = 1)
70 (2 rows)
71
72 -- No. A-5-1-6
73 --SeqScan(t1)
74 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
75           QUERY PLAN          
76 ------------------------------
77  Index Scan using t1_i1 on t1
78    Index Cond: (c1 = 1)
79 (2 rows)
80
81 -- No. A-5-1-7
82 /*+SeqScan(t1) /* nest comment */ */
83 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
84 INFO:  hint syntax error at or near "/* nest comment */ */
85 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
86 DETAIL:  Nested block comments are not supported.
87           QUERY PLAN          
88 ------------------------------
89  Index Scan using t1_i1 on t1
90    Index Cond: (c1 = 1)
91 (2 rows)
92
93 -- No. A-5-1-8
94 /* +SeqScan(t1) /* nest comment */ */
95 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
96           QUERY PLAN          
97 ------------------------------
98  Index Scan using t1_i1 on t1
99    Index Cond: (c1 = 1)
100 (2 rows)
101
102 -- No. A-5-1-9
103 /*SeqScan(t1) /* nest comment */ */
104 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
105           QUERY PLAN          
106 ------------------------------
107  Index Scan using t1_i1 on t1
108    Index Cond: (c1 = 1)
109 (2 rows)
110
111 ----
112 ---- No. A-5-2 hint position
113 ----
114 -- No. A-5-2-1
115 /*+SeqScan(t1)*/
116 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
117 LOG:  pg_hint_plan:
118 used hint:
119 SeqScan(t1)
120 not used hint:
121 duplication hint:
122 error hint:
123
124      QUERY PLAN     
125 --------------------
126  Seq Scan on t1
127    Filter: (c1 = 1)
128 (2 rows)
129
130 -- No. A-5-2-2
131 /* normal comment */
132 /*+SeqScan(t1)*/
133 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
134           QUERY PLAN          
135 ------------------------------
136  Index Scan using t1_i1 on t1
137    Index Cond: (c1 = 1)
138 (2 rows)
139
140 -- No. A-5-2-3
141 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
142           QUERY PLAN          
143 ------------------------------
144  Index Scan using t1_i1 on t1
145    Index Cond: (c1 = 1)
146 (2 rows)
147
148 -- No. A-5-2-4
149
150 ----
151 ---- No. A-6-1 hint's table definition
152 ----
153
154 -- No. A-6-1-1
155
156 ----
157 ---- No. A-6-2 search condition
158 ----
159 -- No. A-6-2-1
160
161 -- No. A-6-2-2
162
163 -- No. A-6-2-3
164
165 -- No. A-6-2-4
166
167 ----
168 ---- No. A-6-3 number of constant
169 ----
170 -- No. A-6-3-1
171
172 -- No. A-6-3-2
173
174 -- No. A-6-3-3
175
176 ----
177 ---- No. A-7-2 hint delimiter
178 ----
179 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
180           QUERY PLAN          
181 ------------------------------
182  Index Scan using t1_i1 on t1
183    Index Cond: (c1 = 1)
184 (2 rows)
185
186 -- No. A-7-2-1
187 -- No. A-7-2-2
188 -- No. A-7-2-3
189 -- No. A-7-2-4
190 -- No. A-7-2-5
191 -- No. A-7-2-6
192 -- No. A-7-2-7
193 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
194 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
195 LOG:  pg_hint_plan:
196 used hint:
197 Set(enable_bitmapscan off)
198 Set(enable_indexscan off)
199 not used hint:
200 duplication hint:
201 error hint:
202
203      QUERY PLAN     
204 --------------------
205  Seq Scan on t1
206    Filter: (c1 = 1)
207 (2 rows)
208
209 -- No. A-7-2-8
210 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
211 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
212 LOG:  pg_hint_plan:
213 used hint:
214 Set(enable_bitmapscan off)
215 Set(enable_indexscan off)
216 not used hint:
217 duplication hint:
218 error hint:
219
220      QUERY PLAN     
221 --------------------
222  Seq Scan on t1
223    Filter: (c1 = 1)
224 (2 rows)
225
226 -- No. A-7-2-9
227 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
228 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
229 LOG:  pg_hint_plan:
230 used hint:
231 Set(enable_bitmapscan off)
232 Set(enable_indexscan off)
233 not used hint:
234 duplication hint:
235 error hint:
236
237      QUERY PLAN     
238 --------------------
239  Seq Scan on t1
240    Filter: (c1 = 1)
241 (2 rows)
242
243 -- No. A-7-2-10
244 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
245 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
246 LOG:  pg_hint_plan:
247 used hint:
248 Set(enable_bitmapscan off)
249 Set(enable_indexscan off)
250 not used hint:
251 duplication hint:
252 error hint:
253
254      QUERY PLAN     
255 --------------------
256  Seq Scan on t1
257    Filter: (c1 = 1)
258 (2 rows)
259
260 -- No. A-7-2-11
261 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
262 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
263 LOG:  pg_hint_plan:
264 used hint:
265 Set(enable_bitmapscan off)
266 Set(enable_indexscan off)
267 not used hint:
268 duplication hint:
269 error hint:
270
271      QUERY PLAN     
272 --------------------
273  Seq Scan on t1
274    Filter: (c1 = 1)
275 (2 rows)
276
277 -- No. A-7-2-12
278 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
279 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
280 LOG:  pg_hint_plan:
281 used hint:
282 Set(enable_bitmapscan off)
283 Set(enable_indexscan off)
284 not used hint:
285 duplication hint:
286 error hint:
287
288      QUERY PLAN     
289 --------------------
290  Seq Scan on t1
291    Filter: (c1 = 1)
292 (2 rows)
293
294 -- No. A-7-2-13
295 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
296 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
297 LOG:  pg_hint_plan:
298 used hint:
299 Set(enable_bitmapscan off)
300 Set(enable_indexscan off)
301 not used hint:
302 duplication hint:
303 error hint:
304
305      QUERY PLAN     
306 --------------------
307  Seq Scan on t1
308    Filter: (c1 = 1)
309 (2 rows)
310
311 -- No. A-7-2-14
312 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
313 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
314 LOG:  pg_hint_plan:
315 used hint:
316 Set(enable_bitmapscan off)
317 Set(enable_indexscan off)
318 not used hint:
319 duplication hint:
320 error hint:
321
322      QUERY PLAN     
323 --------------------
324  Seq Scan on t1
325    Filter: (c1 = 1)
326 (2 rows)
327
328 -- No. A-7-2-15
329 /*+     Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
330 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
331 LOG:  pg_hint_plan:
332 used hint:
333 Set(enable_bitmapscan off)
334 Set(enable_indexscan off)
335 not used hint:
336 duplication hint:
337 error hint:
338
339      QUERY PLAN     
340 --------------------
341  Seq Scan on t1
342    Filter: (c1 = 1)
343 (2 rows)
344
345 -- No. A-7-2-16
346 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")        */
347 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
348 LOG:  pg_hint_plan:
349 used hint:
350 Set(enable_bitmapscan off)
351 Set(enable_indexscan off)
352 not used hint:
353 duplication hint:
354 error hint:
355
356      QUERY PLAN     
357 --------------------
358  Seq Scan on t1
359    Filter: (c1 = 1)
360 (2 rows)
361
362 -- No. A-7-2-17
363 /*+     Set     (enable_indexscan"off") Set     (enable_bitmapscan"off")*/
364 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
365 LOG:  pg_hint_plan:
366 used hint:
367 Set(enable_bitmapscan off)
368 Set(enable_indexscan off)
369 not used hint:
370 duplication hint:
371 error hint:
372
373      QUERY PLAN     
374 --------------------
375  Seq Scan on t1
376    Filter: (c1 = 1)
377 (2 rows)
378
379 -- No. A-7-2-18
380 /*+Set  (       enable_indexscan"off")Set       (       enable_bitmapscan"off")*/
381 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
382 LOG:  pg_hint_plan:
383 used hint:
384 Set(enable_bitmapscan off)
385 Set(enable_indexscan off)
386 not used hint:
387 duplication hint:
388 error hint:
389
390      QUERY PLAN     
391 --------------------
392  Seq Scan on t1
393    Filter: (c1 = 1)
394 (2 rows)
395
396 -- No. A-7-2-19
397 /*+Set(enable_indexscan"off"    )       Set(enable_bitmapscan"off"      )       */
398 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
399 LOG:  pg_hint_plan:
400 used hint:
401 Set(enable_bitmapscan off)
402 Set(enable_indexscan off)
403 not used hint:
404 duplication hint:
405 error hint:
406
407      QUERY PLAN     
408 --------------------
409  Seq Scan on t1
410    Filter: (c1 = 1)
411 (2 rows)
412
413 -- No. A-7-2-20
414 /*+Set( enable_indexscan        "off"   )Set(   enable_bitmapscan       "off"   )*/
415 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
416 LOG:  pg_hint_plan:
417 used hint:
418 Set(enable_bitmapscan off)
419 Set(enable_indexscan off)
420 not used hint:
421 duplication hint:
422 error hint:
423
424      QUERY PLAN     
425 --------------------
426  Seq Scan on t1
427    Filter: (c1 = 1)
428 (2 rows)
429
430 -- No. A-7-2-21
431 /*+     Set     (       enable_indexscan        "off"   )       Set     (       enable_bitmapscan       "off"   )       */
432 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
433 LOG:  pg_hint_plan:
434 used hint:
435 Set(enable_bitmapscan off)
436 Set(enable_indexscan off)
437 not used hint:
438 duplication hint:
439 error hint:
440
441      QUERY PLAN     
442 --------------------
443  Seq Scan on t1
444    Filter: (c1 = 1)
445 (2 rows)
446
447 -- No. A-7-2-22
448 /*+
449 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
450 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
451 LOG:  pg_hint_plan:
452 used hint:
453 Set(enable_bitmapscan off)
454 Set(enable_indexscan off)
455 not used hint:
456 duplication hint:
457 error hint:
458
459      QUERY PLAN     
460 --------------------
461  Seq Scan on t1
462    Filter: (c1 = 1)
463 (2 rows)
464
465 -- No. A-7-2-23
466 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
467 */
468 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
469 LOG:  pg_hint_plan:
470 used hint:
471 Set(enable_bitmapscan off)
472 Set(enable_indexscan off)
473 not used hint:
474 duplication hint:
475 error hint:
476
477      QUERY PLAN     
478 --------------------
479  Seq Scan on t1
480    Filter: (c1 = 1)
481 (2 rows)
482
483 -- No. A-7-2-24
484 /*+
485 Set
486 (enable_indexscan"off")
487 Set
488 (enable_bitmapscan"off")*/
489 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
490 LOG:  pg_hint_plan:
491 used hint:
492 Set(enable_bitmapscan off)
493 Set(enable_indexscan off)
494 not used hint:
495 duplication hint:
496 error hint:
497
498      QUERY PLAN     
499 --------------------
500  Seq Scan on t1
501    Filter: (c1 = 1)
502 (2 rows)
503
504 -- No. A-7-2-25
505 /*+Set
506 (
507 enable_indexscan"off")Set
508 (
509 enable_bitmapscan"off")*/
510 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
511 LOG:  pg_hint_plan:
512 used hint:
513 Set(enable_bitmapscan off)
514 Set(enable_indexscan off)
515 not used hint:
516 duplication hint:
517 error hint:
518
519      QUERY PLAN     
520 --------------------
521  Seq Scan on t1
522    Filter: (c1 = 1)
523 (2 rows)
524
525 -- No. A-7-2-26
526 /*+Set(enable_indexscan"off"
527 )
528 Set(enable_bitmapscan"off"
529 )
530 */
531 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
532 LOG:  pg_hint_plan:
533 used hint:
534 Set(enable_bitmapscan off)
535 Set(enable_indexscan off)
536 not used hint:
537 duplication hint:
538 error hint:
539
540      QUERY PLAN     
541 --------------------
542  Seq Scan on t1
543    Filter: (c1 = 1)
544 (2 rows)
545
546 -- No. A-7-2-27
547 /*+Set(
548 enable_indexscan
549 "off"
550 )Set(
551 enable_bitmapscan
552 "off"
553 )*/
554 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
555 LOG:  pg_hint_plan:
556 used hint:
557 Set(enable_bitmapscan off)
558 Set(enable_indexscan off)
559 not used hint:
560 duplication hint:
561 error hint:
562
563      QUERY PLAN     
564 --------------------
565  Seq Scan on t1
566    Filter: (c1 = 1)
567 (2 rows)
568
569 -- No. A-7-2-28
570 /*+
571 Set
572 (
573 enable_indexscan
574 "off"
575 )
576 Set
577 (
578 enable_bitmapscan
579 "off"
580 )
581 */
582 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
583 LOG:  pg_hint_plan:
584 used hint:
585 Set(enable_bitmapscan off)
586 Set(enable_indexscan off)
587 not used hint:
588 duplication hint:
589 error hint:
590
591      QUERY PLAN     
592 --------------------
593  Seq Scan on t1
594    Filter: (c1 = 1)
595 (2 rows)
596
597 -- No. A-7-2-29
598 /*+     
599          Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
600 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
601 LOG:  pg_hint_plan:
602 used hint:
603 Set(enable_bitmapscan off)
604 Set(enable_indexscan off)
605 not used hint:
606 duplication hint:
607 error hint:
608
609      QUERY PLAN     
610 --------------------
611  Seq Scan on t1
612    Filter: (c1 = 1)
613 (2 rows)
614
615 -- No. A-7-2-30
616 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")        
617          */
618 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
619 LOG:  pg_hint_plan:
620 used hint:
621 Set(enable_bitmapscan off)
622 Set(enable_indexscan off)
623 not used hint:
624 duplication hint:
625 error hint:
626
627      QUERY PLAN     
628 --------------------
629  Seq Scan on t1
630    Filter: (c1 = 1)
631 (2 rows)
632
633 -- No. A-7-2-31
634 /*+     
635          Set    
636          (enable_indexscan"off")        
637          Set    
638          (enable_bitmapscan"off")*/
639 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
640 LOG:  pg_hint_plan:
641 used hint:
642 Set(enable_bitmapscan off)
643 Set(enable_indexscan off)
644 not used hint:
645 duplication hint:
646 error hint:
647
648      QUERY PLAN     
649 --------------------
650  Seq Scan on t1
651    Filter: (c1 = 1)
652 (2 rows)
653
654 -- No. A-7-2-32
655 /*+Set  
656          (      
657          enable_indexscan"off")Set      
658          (      
659          enable_bitmapscan"off")*/
660 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
661 LOG:  pg_hint_plan:
662 used hint:
663 Set(enable_bitmapscan off)
664 Set(enable_indexscan off)
665 not used hint:
666 duplication hint:
667 error hint:
668
669      QUERY PLAN     
670 --------------------
671  Seq Scan on t1
672    Filter: (c1 = 1)
673 (2 rows)
674
675 -- No. A-7-2-33
676 /*+Set(enable_indexscan"off"    
677          )      
678          Set(enable_bitmapscan"off"     
679          )      
680          */
681 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
682 LOG:  pg_hint_plan:
683 used hint:
684 Set(enable_bitmapscan off)
685 Set(enable_indexscan off)
686 not used hint:
687 duplication hint:
688 error hint:
689
690      QUERY PLAN     
691 --------------------
692  Seq Scan on t1
693    Filter: (c1 = 1)
694 (2 rows)
695
696 -- No. A-7-2-34
697 /*+Set(         
698          enable_indexscan       
699          "off"  
700          )Set(  
701          enable_bitmapscan      
702          "off"  
703          )*/
704 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
705 LOG:  pg_hint_plan:
706 used hint:
707 Set(enable_bitmapscan off)
708 Set(enable_indexscan off)
709 not used hint:
710 duplication hint:
711 error hint:
712
713      QUERY PLAN     
714 --------------------
715  Seq Scan on t1
716    Filter: (c1 = 1)
717 (2 rows)
718
719 -- No. A-7-2-35
720 /*+     
721          Set    
722          (      
723          enable_indexscan       
724          "off"  
725          )      
726          Set    
727          (      
728          enable_bitmapscan      
729          "off"  
730          )      
731          */
732 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
733 LOG:  pg_hint_plan:
734 used hint:
735 Set(enable_bitmapscan off)
736 Set(enable_indexscan off)
737 not used hint:
738 duplication hint:
739 error hint:
740
741      QUERY PLAN     
742 --------------------
743  Seq Scan on t1
744    Filter: (c1 = 1)
745 (2 rows)
746
747 ----
748 ---- No. A-7-3 hint object pattern
749 ---- No. A-9-2 message object pattern
750 ----
751 -- No. A-7-3-1
752 -- No. A-9-2-1
753 /*+SeqScan(t)*/
754 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
755 LOG:  pg_hint_plan:
756 used hint:
757 SeqScan(t)
758 not used hint:
759 duplication hint:
760 error hint:
761
762      QUERY PLAN     
763 --------------------
764  Seq Scan on t1 t
765    Filter: (c1 = 1)
766 (2 rows)
767
768 /*+SeqScan(ttt)*/
769 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
770 LOG:  pg_hint_plan:
771 used hint:
772 SeqScan(ttt)
773 not used hint:
774 duplication hint:
775 error hint:
776
777      QUERY PLAN     
778 --------------------
779  Seq Scan on t1 ttt
780    Filter: (c1 = 1)
781 (2 rows)
782
783 /*+SeqScan("t")*/
784 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
785 LOG:  pg_hint_plan:
786 used hint:
787 SeqScan(t)
788 not used hint:
789 duplication hint:
790 error hint:
791
792      QUERY PLAN     
793 --------------------
794  Seq Scan on t1 t
795    Filter: (c1 = 1)
796 (2 rows)
797
798 /*+SeqScan("ttt")*/
799 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
800 LOG:  pg_hint_plan:
801 used hint:
802 SeqScan(ttt)
803 not used hint:
804 duplication hint:
805 error hint:
806
807      QUERY PLAN     
808 --------------------
809  Seq Scan on t1 ttt
810    Filter: (c1 = 1)
811 (2 rows)
812
813 -- No. A-7-3-2
814 -- No. A-9-2-2
815 /*+SeqScan(T)*/
816 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
817 LOG:  pg_hint_plan:
818 used hint:
819 SeqScan(T)
820 not used hint:
821 duplication hint:
822 error hint:
823
824      QUERY PLAN     
825 --------------------
826  Seq Scan on t1 "T"
827    Filter: (c1 = 1)
828 (2 rows)
829
830 /*+SeqScan(TTT)*/
831 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
832 LOG:  pg_hint_plan:
833 used hint:
834 SeqScan(TTT)
835 not used hint:
836 duplication hint:
837 error hint:
838
839       QUERY PLAN      
840 ----------------------
841  Seq Scan on t1 "TTT"
842    Filter: (c1 = 1)
843 (2 rows)
844
845 /*+SeqScan("T")*/
846 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
847 LOG:  pg_hint_plan:
848 used hint:
849 SeqScan(T)
850 not used hint:
851 duplication hint:
852 error hint:
853
854      QUERY PLAN     
855 --------------------
856  Seq Scan on t1 "T"
857    Filter: (c1 = 1)
858 (2 rows)
859
860 /*+SeqScan("TTT")*/
861 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
862 LOG:  pg_hint_plan:
863 used hint:
864 SeqScan(TTT)
865 not used hint:
866 duplication hint:
867 error hint:
868
869       QUERY PLAN      
870 ----------------------
871  Seq Scan on t1 "TTT"
872    Filter: (c1 = 1)
873 (2 rows)
874
875 -- No. A-7-3-3
876 -- No. A-9-2-3
877 /*+SeqScan(()*/
878 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
879 LOG:  pg_hint_plan:
880 used hint:
881 SeqScan(()
882 not used hint:
883 duplication hint:
884 error hint:
885
886      QUERY PLAN     
887 --------------------
888  Seq Scan on t1 "("
889    Filter: (c1 = 1)
890 (2 rows)
891
892 /*+SeqScan(((()*/
893 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
894 LOG:  pg_hint_plan:
895 used hint:
896 SeqScan(((()
897 not used hint:
898 duplication hint:
899 error hint:
900
901       QUERY PLAN      
902 ----------------------
903  Seq Scan on t1 "((("
904    Filter: (c1 = 1)
905 (2 rows)
906
907 /*+SeqScan("(")*/
908 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
909 LOG:  pg_hint_plan:
910 used hint:
911 SeqScan(()
912 not used hint:
913 duplication hint:
914 error hint:
915
916      QUERY PLAN     
917 --------------------
918  Seq Scan on t1 "("
919    Filter: (c1 = 1)
920 (2 rows)
921
922 /*+SeqScan("(((")*/
923 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
924 LOG:  pg_hint_plan:
925 used hint:
926 SeqScan(((()
927 not used hint:
928 duplication hint:
929 error hint:
930
931       QUERY PLAN      
932 ----------------------
933  Seq Scan on t1 "((("
934    Filter: (c1 = 1)
935 (2 rows)
936
937 -- No. A-7-3-4
938 -- No. A-9-2-4
939 /*+SeqScan())*/
940 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
941 INFO:  hint syntax error at or near ")"
942 DETAIL:  SeqScan hint requires a relation.
943 INFO:  hint syntax error at or near ")"
944 DETAIL:  Unrecognized hint keyword ")".
945 LOG:  pg_hint_plan:
946 used hint:
947 not used hint:
948 duplication hint:
949 error hint:
950 SeqScan()
951
952             QUERY PLAN            
953 ----------------------------------
954  Index Scan using t1_i1 on t1 ")"
955    Index Cond: (c1 = 1)
956 (2 rows)
957
958 /*+SeqScan(")")*/
959 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
960 LOG:  pg_hint_plan:
961 used hint:
962 SeqScan(")")
963 not used hint:
964 duplication hint:
965 error hint:
966
967      QUERY PLAN     
968 --------------------
969  Seq Scan on t1 ")"
970    Filter: (c1 = 1)
971 (2 rows)
972
973 /*+SeqScan(")))")*/
974 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
975 LOG:  pg_hint_plan:
976 used hint:
977 SeqScan(")))")
978 not used hint:
979 duplication hint:
980 error hint:
981
982       QUERY PLAN      
983 ----------------------
984  Seq Scan on t1 ")))"
985    Filter: (c1 = 1)
986 (2 rows)
987
988 -- No. A-7-3-5
989 -- No. A-9-2-5
990 /*+SeqScan(")*/
991 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
992 INFO:  hint syntax error at or near ""
993 DETAIL:  Unterminated quoted string.
994             QUERY PLAN             
995 -----------------------------------
996  Index Scan using t1_i1 on t1 """"
997    Index Cond: (c1 = 1)
998 (2 rows)
999
1000 /*+SeqScan("""")*/
1001 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1002 LOG:  pg_hint_plan:
1003 used hint:
1004 SeqScan("""")
1005 not used hint:
1006 duplication hint:
1007 error hint:
1008
1009      QUERY PLAN      
1010 ---------------------
1011  Seq Scan on t1 """"
1012    Filter: (c1 = 1)
1013 (2 rows)
1014
1015 /*+SeqScan("""""""")*/
1016 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
1017 LOG:  pg_hint_plan:
1018 used hint:
1019 SeqScan("""""""")
1020 not used hint:
1021 duplication hint:
1022 error hint:
1023
1024        QUERY PLAN        
1025 -------------------------
1026  Seq Scan on t1 """"""""
1027    Filter: (c1 = 1)
1028 (2 rows)
1029
1030 -- No. A-7-3-6
1031 -- No. A-9-2-6
1032 /*+SeqScan( )*/
1033 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1034 INFO:  hint syntax error at or near ""
1035 DETAIL:  SeqScan hint requires a relation.
1036 LOG:  pg_hint_plan:
1037 used hint:
1038 not used hint:
1039 duplication hint:
1040 error hint:
1041 SeqScan()
1042
1043             QUERY PLAN            
1044 ----------------------------------
1045  Index Scan using t1_i1 on t1 " "
1046    Index Cond: (c1 = 1)
1047 (2 rows)
1048
1049 /*+SeqScan(" ")*/
1050 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1051 LOG:  pg_hint_plan:
1052 used hint:
1053 SeqScan(" ")
1054 not used hint:
1055 duplication hint:
1056 error hint:
1057
1058      QUERY PLAN     
1059 --------------------
1060  Seq Scan on t1 " "
1061    Filter: (c1 = 1)
1062 (2 rows)
1063
1064 /*+SeqScan("   ")*/
1065 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "   " WHERE "   ".c1 = 1;
1066 LOG:  pg_hint_plan:
1067 used hint:
1068 SeqScan("   ")
1069 not used hint:
1070 duplication hint:
1071 error hint:
1072
1073       QUERY PLAN      
1074 ----------------------
1075  Seq Scan on t1 "   "
1076    Filter: (c1 = 1)
1077 (2 rows)
1078
1079 -- No. A-7-3-7
1080 -- No. A-9-2-7
1081 /*+SeqScan(     )*/
1082 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "     " WHERE "       ".c1 = 1;
1083 INFO:  hint syntax error at or near ""
1084 DETAIL:  SeqScan hint requires a relation.
1085 LOG:  pg_hint_plan:
1086 used hint:
1087 not used hint:
1088 duplication hint:
1089 error hint:
1090 SeqScan()
1091
1092             QUERY PLAN             
1093 -----------------------------------
1094  Index Scan using t1_i1 on t1 "  "
1095    Index Cond: (c1 = 1)
1096 (2 rows)
1097
1098 /*+SeqScan("    ")*/
1099 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "     " WHERE "       ".c1 = 1;
1100 LOG:  pg_hint_plan:
1101 used hint:
1102 SeqScan("       ")
1103 not used hint:
1104 duplication hint:
1105 error hint:
1106
1107         QUERY PLAN         
1108 ---------------------------
1109  Seq Scan on t1 "        "
1110    Filter: (c1 = 1)
1111 (2 rows)
1112
1113 /*+SeqScan("                    ")*/
1114 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "                     " WHERE "                       ".c1 = 1;
1115 LOG:  pg_hint_plan:
1116 used hint:
1117 SeqScan("                       ")
1118 not used hint:
1119 duplication hint:
1120 error hint:
1121
1122                 QUERY PLAN                 
1123 -------------------------------------------
1124  Seq Scan on t1 "                        "
1125    Filter: (c1 = 1)
1126 (2 rows)
1127
1128 -- No. A-7-3-8
1129 -- No. A-9-2-8
1130 /*+SeqScan(
1131 )*/
1132 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1133 " WHERE "
1134 ".c1 = 1;
1135 INFO:  hint syntax error at or near ""
1136 DETAIL:  SeqScan hint requires a relation.
1137 LOG:  pg_hint_plan:
1138 used hint:
1139 not used hint:
1140 duplication hint:
1141 error hint:
1142 SeqScan()
1143
1144            QUERY PLAN           
1145 --------------------------------
1146  Index Scan using t1_i1 on t1 "
1147  "
1148    Index Cond: (c1 = 1)
1149 (3 rows)
1150
1151 /*+SeqScan("
1152 ")*/
1153 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1154 " WHERE "
1155 ".c1 = 1;
1156 LOG:  pg_hint_plan:
1157 used hint:
1158 SeqScan("
1159 ")
1160 not used hint:
1161 duplication hint:
1162 error hint:
1163
1164      QUERY PLAN     
1165 --------------------
1166  Seq Scan on t1 "
1167  "
1168    Filter: (c1 = 1)
1169 (3 rows)
1170
1171 /*+SeqScan("
1172
1173
1174 ")*/
1175 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1176
1177
1178 " WHERE "
1179
1180
1181 ".c1 = 1;
1182 LOG:  pg_hint_plan:
1183 used hint:
1184 SeqScan("
1185
1186
1187 ")
1188 not used hint:
1189 duplication hint:
1190 error hint:
1191
1192      QUERY PLAN     
1193 --------------------
1194  Seq Scan on t1 "
1195  
1196  
1197  "
1198    Filter: (c1 = 1)
1199 (5 rows)
1200
1201 -- No. A-7-3-9
1202 -- No. A-9-2-9
1203 /*+SeqScan(Set)*/
1204 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1205 LOG:  pg_hint_plan:
1206 used hint:
1207 SeqScan(Set)
1208 not used hint:
1209 duplication hint:
1210 error hint:
1211
1212       QUERY PLAN      
1213 ----------------------
1214  Seq Scan on t1 "Set"
1215    Filter: (c1 = 1)
1216 (2 rows)
1217
1218 /*+SeqScan("Set")*/
1219 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1220 LOG:  pg_hint_plan:
1221 used hint:
1222 SeqScan(Set)
1223 not used hint:
1224 duplication hint:
1225 error hint:
1226
1227       QUERY PLAN      
1228 ----------------------
1229  Seq Scan on t1 "Set"
1230    Filter: (c1 = 1)
1231 (2 rows)
1232
1233 /*+SeqScan("Set SeqScan Leading")*/
1234 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1235 LOG:  pg_hint_plan:
1236 used hint:
1237 SeqScan("Set SeqScan Leading")
1238 not used hint:
1239 duplication hint:
1240 error hint:
1241
1242               QUERY PLAN              
1243 --------------------------------------
1244  Seq Scan on t1 "Set SeqScan Leading"
1245    Filter: (c1 = 1)
1246 (2 rows)
1247
1248 -- No. A-7-3-10
1249 -- No. A-9-2-10
1250 /*+SeqScan(あ)*/
1251 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1252 LOG:  pg_hint_plan:
1253 used hint:
1254 SeqScan(あ)
1255 not used hint:
1256 duplication hint:
1257 error hint:
1258
1259      QUERY PLAN      
1260 ---------------------
1261  Seq Scan on t1 "あ"
1262    Filter: (c1 = 1)
1263 (2 rows)
1264
1265 /*+SeqScan(あいう)*/
1266 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1267 LOG:  pg_hint_plan:
1268 used hint:
1269 SeqScan(あいう)
1270 not used hint:
1271 duplication hint:
1272 error hint:
1273
1274        QUERY PLAN        
1275 -------------------------
1276  Seq Scan on t1 "あいう"
1277    Filter: (c1 = 1)
1278 (2 rows)
1279
1280 /*+SeqScan("あ")*/
1281 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1282 LOG:  pg_hint_plan:
1283 used hint:
1284 SeqScan(あ)
1285 not used hint:
1286 duplication hint:
1287 error hint:
1288
1289      QUERY PLAN      
1290 ---------------------
1291  Seq Scan on t1 "あ"
1292    Filter: (c1 = 1)
1293 (2 rows)
1294
1295 /*+SeqScan("あいう")*/
1296 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1297 LOG:  pg_hint_plan:
1298 used hint:
1299 SeqScan(あいう)
1300 not used hint:
1301 duplication hint:
1302 error hint:
1303
1304        QUERY PLAN        
1305 -------------------------
1306  Seq Scan on t1 "あいう"
1307    Filter: (c1 = 1)
1308 (2 rows)
1309
1310 -- No. A-7-3-11
1311 -- No. A-9-2-11
1312 /*+SeqScan(/**/)*/
1313 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1314 INFO:  hint syntax error at or near "/**/)*/
1315 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1316 DETAIL:  Nested block comments are not supported.
1317              QUERY PLAN              
1318 -------------------------------------
1319  Index Scan using t1_i1 on t1 "/**/"
1320    Index Cond: (c1 = 1)
1321 (2 rows)
1322
1323 /*+SeqScan(/**//**//**/)*/
1324 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1325 INFO:  hint syntax error at or near "/**//**//**/)*/
1326 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1327 DETAIL:  Nested block comments are not supported.
1328                  QUERY PLAN                  
1329 ---------------------------------------------
1330  Index Scan using t1_i1 on t1 "/**//**//**/"
1331    Index Cond: (c1 = 1)
1332 (2 rows)
1333
1334 -- No. A-7-3-12
1335 -- No. A-9-2-12
1336 /*+SeqScan("tT()""      
1337 Set/**/あ")*/
1338 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""       
1339 Set/**/あ" WHERE "tT()""       
1340 Set/**/あ".c1 = 1;
1341 INFO:  hint syntax error at or near "/**/あ")*/
1342 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""       
1343 Set/**/あ" WHERE "tT()""       
1344 Set/**/あ".c1 = 1;"
1345 DETAIL:  Nested block comments are not supported.
1346                 QUERY PLAN                
1347 ------------------------------------------
1348  Index Scan using t1_i1 on t1 "tT()""    
1349  Set/**/あ"
1350    Index Cond: (c1 = 1)
1351 (3 rows)
1352
1353 --"
1354 /*+SeqScan("tT()""      
1355 Setあ")*/
1356 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""       
1357 Setあ" WHERE "tT()""   
1358 Setあ".c1 = 1;
1359 LOG:  pg_hint_plan:
1360 used hint:
1361 SeqScan("tT()""         
1362 Setあ")
1363 not used hint:
1364 duplication hint:
1365 error hint:
1366
1367         QUERY PLAN        
1368 --------------------------
1369  Seq Scan on t1 "tT()""  
1370  Setあ"
1371    Filter: (c1 = 1)
1372 (3 rows)
1373
1374 ----
1375 ---- No. A-7-4 hint parse error
1376 ----
1377 -- No. A-7-4-1
1378 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1379 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1380 INFO:  hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1381 DETAIL:  Opening parenthesis is necessary.
1382 LOG:  pg_hint_plan:
1383 used hint:
1384 Set(enable_indexscan off)
1385 not used hint:
1386 duplication hint:
1387 error hint:
1388
1389             QUERY PLAN            
1390 ----------------------------------
1391  Bitmap Heap Scan on t1
1392    Recheck Cond: (c1 = 1)
1393    ->  Bitmap Index Scan on t1_i1
1394          Index Cond: (c1 = 1)
1395 (4 rows)
1396
1397 -- No. A-7-4-2
1398 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1399 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1400 INFO:  hint syntax error at or near "Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)"
1401 DETAIL:  Set hint requires name and value of GUC parameter.
1402 LOG:  pg_hint_plan:
1403 used hint:
1404 SeqScan(t1)
1405 Set(enable_indexscan off)
1406 not used hint:
1407 duplication hint:
1408 error hint:
1409 Set(enable_tidscan off Set(enable_bitmapscan off)
1410
1411      QUERY PLAN     
1412 --------------------
1413  Seq Scan on t1
1414    Filter: (c1 = 1)
1415 (2 rows)
1416
1417 -- No. A-7-4-3
1418 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1419 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1420 INFO:  hint syntax error at or near ""
1421 DETAIL:  Unterminated quoted string.
1422 LOG:  pg_hint_plan:
1423 used hint:
1424 Set(enable_indexscan off)
1425 not used hint:
1426 duplication hint:
1427 error hint:
1428
1429             QUERY PLAN            
1430 ----------------------------------
1431  Bitmap Heap Scan on t1
1432    Recheck Cond: (c1 = 1)
1433    ->  Bitmap Index Scan on t1_i1
1434          Index Cond: (c1 = 1)
1435 (4 rows)
1436
1437 -- No. A-7-4-4
1438 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1439 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1440 INFO:  hint syntax error at or near ")Set(enable_bitmapscan off)"
1441 DETAIL:  Zero-length delimited string.
1442 LOG:  pg_hint_plan:
1443 used hint:
1444 Set(enable_indexscan off)
1445 not used hint:
1446 duplication hint:
1447 error hint:
1448
1449             QUERY PLAN            
1450 ----------------------------------
1451  Bitmap Heap Scan on t1
1452    Recheck Cond: (c1 = 1)
1453    ->  Bitmap Index Scan on t1_i1
1454          Index Cond: (c1 = 1)
1455 (4 rows)
1456
1457 -- No. A-7-4-5
1458 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1459 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1460 INFO:  hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1461 DETAIL:  Unrecognized hint keyword "NoSet".
1462 LOG:  pg_hint_plan:
1463 used hint:
1464 Set(enable_indexscan off)
1465 not used hint:
1466 duplication hint:
1467 error hint:
1468
1469             QUERY PLAN            
1470 ----------------------------------
1471  Bitmap Heap Scan on t1
1472    Recheck Cond: (c1 = 1)
1473    ->  Bitmap Index Scan on t1_i1
1474          Index Cond: (c1 = 1)
1475 (4 rows)
1476
1477 -- No. A-7-4-6
1478 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1479 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1480 INFO:  hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1481 DETAIL:  Unrecognized hint keyword ""Set"".
1482 LOG:  pg_hint_plan:
1483 used hint:
1484 Set(enable_indexscan off)
1485 not used hint:
1486 duplication hint:
1487 error hint:
1488
1489             QUERY PLAN            
1490 ----------------------------------
1491  Bitmap Heap Scan on t1
1492    Recheck Cond: (c1 = 1)
1493    ->  Bitmap Index Scan on t1_i1
1494          Index Cond: (c1 = 1)
1495 (4 rows)
1496
1497 -- No. A-7-4-7
1498 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1499 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1500 INFO:  hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1501 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1502 DETAIL:  Nested block comments are not supported.
1503           QUERY PLAN          
1504 ------------------------------
1505  Index Scan using t1_i1 on t1
1506    Index Cond: (c1 = 1)
1507 (2 rows)
1508
1509 ----
1510 ---- No. A-8-1 original GUC parameter
1511 ----
1512 -- No. A-8-1-1
1513 SET ROLE super_user;
1514 SET pg_hint_plan.debug_print TO off;
1515 SHOW pg_hint_plan.enable_hint;
1516  pg_hint_plan.enable_hint 
1517 --------------------------
1518  on
1519 (1 row)
1520
1521 SHOW pg_hint_plan.debug_print;
1522  pg_hint_plan.debug_print 
1523 --------------------------
1524  off
1525 (1 row)
1526
1527 SHOW pg_hint_plan.parse_messages;
1528  pg_hint_plan.parse_messages 
1529 -----------------------------
1530  info
1531 (1 row)
1532
1533 SET pg_hint_plan.enable_hint TO off;
1534 SET pg_hint_plan.debug_print TO on;
1535 SET pg_hint_plan.parse_messages TO error;
1536 SHOW pg_hint_plan.enable_hint;
1537  pg_hint_plan.enable_hint 
1538 --------------------------
1539  off
1540 (1 row)
1541
1542 SHOW pg_hint_plan.debug_print;
1543  pg_hint_plan.debug_print 
1544 --------------------------
1545  on
1546 (1 row)
1547
1548 SHOW pg_hint_plan.parse_messages;
1549  pg_hint_plan.parse_messages 
1550 -----------------------------
1551  error
1552 (1 row)
1553
1554 RESET pg_hint_plan.enable_hint;
1555 RESET pg_hint_plan.debug_print;
1556 RESET pg_hint_plan.parse_messages;
1557 SHOW pg_hint_plan.enable_hint;
1558  pg_hint_plan.enable_hint 
1559 --------------------------
1560  on
1561 (1 row)
1562
1563 SHOW pg_hint_plan.debug_print;
1564  pg_hint_plan.debug_print 
1565 --------------------------
1566  off
1567 (1 row)
1568
1569 SHOW pg_hint_plan.parse_messages;
1570  pg_hint_plan.parse_messages 
1571 -----------------------------
1572  info
1573 (1 row)
1574
1575 -- No. A-8-1-2
1576 SET ROLE normal_user;
1577 SHOW pg_hint_plan.enable_hint;
1578  pg_hint_plan.enable_hint 
1579 --------------------------
1580  on
1581 (1 row)
1582
1583 SHOW pg_hint_plan.debug_print;
1584  pg_hint_plan.debug_print 
1585 --------------------------
1586  off
1587 (1 row)
1588
1589 SHOW pg_hint_plan.parse_messages;
1590  pg_hint_plan.parse_messages 
1591 -----------------------------
1592  info
1593 (1 row)
1594
1595 SET pg_hint_plan.enable_hint TO off;
1596 SET pg_hint_plan.debug_print TO on;
1597 SET pg_hint_plan.parse_messages TO error;
1598 SHOW pg_hint_plan.enable_hint;
1599  pg_hint_plan.enable_hint 
1600 --------------------------
1601  off
1602 (1 row)
1603
1604 SHOW pg_hint_plan.debug_print;
1605  pg_hint_plan.debug_print 
1606 --------------------------
1607  on
1608 (1 row)
1609
1610 SHOW pg_hint_plan.parse_messages;
1611  pg_hint_plan.parse_messages 
1612 -----------------------------
1613  error
1614 (1 row)
1615
1616 RESET pg_hint_plan.enable_hint;
1617 RESET pg_hint_plan.debug_print;
1618 RESET pg_hint_plan.parse_messages;
1619 SHOW pg_hint_plan.enable_hint;
1620  pg_hint_plan.enable_hint 
1621 --------------------------
1622  on
1623 (1 row)
1624
1625 SHOW pg_hint_plan.debug_print;
1626  pg_hint_plan.debug_print 
1627 --------------------------
1628  off
1629 (1 row)
1630
1631 SHOW pg_hint_plan.parse_messages;
1632  pg_hint_plan.parse_messages 
1633 -----------------------------
1634  info
1635 (1 row)
1636
1637 RESET ROLE;
1638 ----
1639 ---- No. A-8-2 original GUC parameter pg_hint_plan.enable_hint
1640 ----
1641 -- No. A-8-2-1
1642 SET pg_hint_plan.enable_hint TO on;
1643 SHOW pg_hint_plan.enable_hint;
1644  pg_hint_plan.enable_hint 
1645 --------------------------
1646  on
1647 (1 row)
1648
1649 /*+Set(enable_indexscan off)*/
1650 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1651             QUERY PLAN            
1652 ----------------------------------
1653  Bitmap Heap Scan on t1
1654    Recheck Cond: (c1 = 1)
1655    ->  Bitmap Index Scan on t1_i1
1656          Index Cond: (c1 = 1)
1657 (4 rows)
1658
1659 -- No. A-8-2-2
1660 SET pg_hint_plan.enable_hint TO off;
1661 SHOW pg_hint_plan.enable_hint;
1662  pg_hint_plan.enable_hint 
1663 --------------------------
1664  off
1665 (1 row)
1666
1667 /*+Set(enable_indexscan off)*/
1668 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1669           QUERY PLAN          
1670 ------------------------------
1671  Index Scan using t1_i1 on t1
1672    Index Cond: (c1 = 1)
1673 (2 rows)
1674
1675 -- No. A-8-2-3
1676 SET pg_hint_plan.enable_hint TO DEFAULT;
1677 SHOW pg_hint_plan.enable_hint;
1678  pg_hint_plan.enable_hint 
1679 --------------------------
1680  on
1681 (1 row)
1682
1683 /*+Set(enable_indexscan off)*/
1684 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1685             QUERY PLAN            
1686 ----------------------------------
1687  Bitmap Heap Scan on t1
1688    Recheck Cond: (c1 = 1)
1689    ->  Bitmap Index Scan on t1_i1
1690          Index Cond: (c1 = 1)
1691 (4 rows)
1692
1693 -- No. A-8-2-4
1694 SET pg_hint_plan.enable_hint TO enable;
1695 ERROR:  parameter "pg_hint_plan.enable_hint" requires a Boolean value
1696 SHOW pg_hint_plan.enable_hint;
1697  pg_hint_plan.enable_hint 
1698 --------------------------
1699  on
1700 (1 row)
1701
1702 ----
1703 ---- No. A-8-3 original GUC parameter pg_hint_plan.debug_print
1704 ----
1705 -- No. A-8-3-1
1706 SET pg_hint_plan.debug_print TO on;
1707 SHOW pg_hint_plan.debug_print;
1708  pg_hint_plan.debug_print 
1709 --------------------------
1710  on
1711 (1 row)
1712
1713 /*+Set(enable_indexscan off)*/
1714 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1715 LOG:  pg_hint_plan:
1716 used hint:
1717 Set(enable_indexscan off)
1718 not used hint:
1719 duplication hint:
1720 error hint:
1721
1722             QUERY PLAN            
1723 ----------------------------------
1724  Bitmap Heap Scan on t1
1725    Recheck Cond: (c1 = 1)
1726    ->  Bitmap Index Scan on t1_i1
1727          Index Cond: (c1 = 1)
1728 (4 rows)
1729
1730 -- No. A-8-3-2
1731 SET pg_hint_plan.debug_print TO off;
1732 SHOW pg_hint_plan.debug_print;
1733  pg_hint_plan.debug_print 
1734 --------------------------
1735  off
1736 (1 row)
1737
1738 /*+Set(enable_indexscan off)*/
1739 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1740             QUERY PLAN            
1741 ----------------------------------
1742  Bitmap Heap Scan on t1
1743    Recheck Cond: (c1 = 1)
1744    ->  Bitmap Index Scan on t1_i1
1745          Index Cond: (c1 = 1)
1746 (4 rows)
1747
1748 -- No. A-8-3-3
1749 SET pg_hint_plan.debug_print TO DEFAULT;
1750 SHOW pg_hint_plan.debug_print;
1751  pg_hint_plan.debug_print 
1752 --------------------------
1753  off
1754 (1 row)
1755
1756 /*+Set(enable_indexscan off)*/
1757 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1758             QUERY PLAN            
1759 ----------------------------------
1760  Bitmap Heap Scan on t1
1761    Recheck Cond: (c1 = 1)
1762    ->  Bitmap Index Scan on t1_i1
1763          Index Cond: (c1 = 1)
1764 (4 rows)
1765
1766 -- No. A-8-3-4
1767 SET pg_hint_plan.debug_print TO enable;
1768 ERROR:  parameter "pg_hint_plan.debug_print" requires a Boolean value
1769 SHOW pg_hint_plan.debug_print;
1770  pg_hint_plan.debug_print 
1771 --------------------------
1772  off
1773 (1 row)
1774
1775 ----
1776 ---- No. A-8-4 original GUC parameter pg_hint_plan.parse_messages
1777 ----
1778 SET client_min_messages TO debug5;
1779 DEBUG:  CommitTransactionCommand
1780 DEBUG:  CommitTransaction
1781 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1782 -- No. A-8-4-1
1783 SET pg_hint_plan.parse_messages TO debug5;
1784 DEBUG:  StartTransactionCommand
1785 DEBUG:  StartTransaction
1786 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1787 DEBUG:  ProcessUtility
1788 DEBUG:  CommitTransactionCommand
1789 DEBUG:  CommitTransaction
1790 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1791 SHOW pg_hint_plan.parse_messages;
1792 DEBUG:  StartTransactionCommand
1793 DEBUG:  StartTransaction
1794 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1795 DEBUG:  ProcessUtility
1796 DEBUG:  CommitTransactionCommand
1797 DEBUG:  CommitTransaction
1798 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1799  pg_hint_plan.parse_messages 
1800 -----------------------------
1801  debug5
1802 (1 row)
1803
1804 /*+Set*/SELECT 1;
1805 DEBUG:  StartTransactionCommand
1806 DEBUG:  StartTransaction
1807 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1808 DEBUG:  hint syntax error at or near ""
1809 DETAIL:  Opening parenthesis is necessary.
1810 DEBUG:  CommitTransactionCommand
1811 DEBUG:  CommitTransaction
1812 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1813  ?column? 
1814 ----------
1815         1
1816 (1 row)
1817
1818 SET client_min_messages TO debug4;
1819 DEBUG:  StartTransactionCommand
1820 DEBUG:  StartTransaction
1821 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1822 DEBUG:  ProcessUtility
1823 DEBUG:  CommitTransactionCommand
1824 DEBUG:  CommitTransaction
1825 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1826 /*+Set*/SELECT 1;
1827 DEBUG:  StartTransactionCommand
1828 DEBUG:  StartTransaction
1829 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1830 DEBUG:  CommitTransactionCommand
1831 DEBUG:  CommitTransaction
1832 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1833  ?column? 
1834 ----------
1835         1
1836 (1 row)
1837
1838 -- No. A-8-4-2
1839 SET pg_hint_plan.parse_messages TO debug4;
1840 DEBUG:  StartTransactionCommand
1841 DEBUG:  StartTransaction
1842 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1843 DEBUG:  ProcessUtility
1844 DEBUG:  CommitTransactionCommand
1845 DEBUG:  CommitTransaction
1846 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1847 SHOW pg_hint_plan.parse_messages;
1848 DEBUG:  StartTransactionCommand
1849 DEBUG:  StartTransaction
1850 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1851 DEBUG:  ProcessUtility
1852 DEBUG:  CommitTransactionCommand
1853 DEBUG:  CommitTransaction
1854 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1855  pg_hint_plan.parse_messages 
1856 -----------------------------
1857  debug4
1858 (1 row)
1859
1860 /*+Set*/SELECT 1;
1861 DEBUG:  StartTransactionCommand
1862 DEBUG:  StartTransaction
1863 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1864 DEBUG:  hint syntax error at or near ""
1865 DETAIL:  Opening parenthesis is necessary.
1866 DEBUG:  CommitTransactionCommand
1867 DEBUG:  CommitTransaction
1868 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1869  ?column? 
1870 ----------
1871         1
1872 (1 row)
1873
1874 SET client_min_messages TO debug3;
1875 DEBUG:  StartTransactionCommand
1876 DEBUG:  StartTransaction
1877 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1878 DEBUG:  ProcessUtility
1879 DEBUG:  CommitTransactionCommand
1880 DEBUG:  CommitTransaction
1881 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1882 /*+Set*/SELECT 1;
1883 DEBUG:  StartTransactionCommand
1884 DEBUG:  StartTransaction
1885 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1886 DEBUG:  CommitTransactionCommand
1887 DEBUG:  CommitTransaction
1888 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1889  ?column? 
1890 ----------
1891         1
1892 (1 row)
1893
1894 -- No. A-8-4-3
1895 SET pg_hint_plan.parse_messages TO debug3;
1896 DEBUG:  StartTransactionCommand
1897 DEBUG:  StartTransaction
1898 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1899 DEBUG:  ProcessUtility
1900 DEBUG:  CommitTransactionCommand
1901 DEBUG:  CommitTransaction
1902 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1903 SHOW pg_hint_plan.parse_messages;
1904 DEBUG:  StartTransactionCommand
1905 DEBUG:  StartTransaction
1906 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1907 DEBUG:  ProcessUtility
1908 DEBUG:  CommitTransactionCommand
1909 DEBUG:  CommitTransaction
1910 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1911  pg_hint_plan.parse_messages 
1912 -----------------------------
1913  debug3
1914 (1 row)
1915
1916 /*+Set*/SELECT 1;
1917 DEBUG:  StartTransactionCommand
1918 DEBUG:  StartTransaction
1919 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1920 DEBUG:  hint syntax error at or near ""
1921 DETAIL:  Opening parenthesis is necessary.
1922 DEBUG:  CommitTransactionCommand
1923 DEBUG:  CommitTransaction
1924 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1925  ?column? 
1926 ----------
1927         1
1928 (1 row)
1929
1930 SET client_min_messages TO debug2;
1931 DEBUG:  StartTransactionCommand
1932 DEBUG:  StartTransaction
1933 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1934 DEBUG:  ProcessUtility
1935 /*+Set*/SELECT 1;
1936  ?column? 
1937 ----------
1938         1
1939 (1 row)
1940
1941 -- No. A-8-4-4
1942 SET pg_hint_plan.parse_messages TO debug2;
1943 SHOW pg_hint_plan.parse_messages;
1944  pg_hint_plan.parse_messages 
1945 -----------------------------
1946  debug
1947 (1 row)
1948
1949 /*+Set*/SELECT 1;
1950 DEBUG:  hint syntax error at or near ""
1951 DETAIL:  Opening parenthesis is necessary.
1952  ?column? 
1953 ----------
1954         1
1955 (1 row)
1956
1957 SET client_min_messages TO debug1;
1958 /*+Set*/SELECT 1;
1959  ?column? 
1960 ----------
1961         1
1962 (1 row)
1963
1964 -- No. A-8-4-5
1965 SET pg_hint_plan.parse_messages TO debug1;
1966 SHOW pg_hint_plan.parse_messages;
1967  pg_hint_plan.parse_messages 
1968 -----------------------------
1969  debug1
1970 (1 row)
1971
1972 /*+Set*/SELECT 1;
1973 DEBUG:  hint syntax error at or near ""
1974 DETAIL:  Opening parenthesis is necessary.
1975  ?column? 
1976 ----------
1977         1
1978 (1 row)
1979
1980 SET client_min_messages TO log;
1981 /*+Set*/SELECT 1;
1982  ?column? 
1983 ----------
1984         1
1985 (1 row)
1986
1987 -- No. A-8-4-6
1988 SET pg_hint_plan.parse_messages TO log;
1989 SHOW pg_hint_plan.parse_messages;
1990  pg_hint_plan.parse_messages 
1991 -----------------------------
1992  log
1993 (1 row)
1994
1995 /*+Set*/SELECT 1;
1996 LOG:  hint syntax error at or near ""
1997 DETAIL:  Opening parenthesis is necessary.
1998  ?column? 
1999 ----------
2000         1
2001 (1 row)
2002
2003 SET client_min_messages TO info;
2004 /*+Set*/SELECT 1;
2005  ?column? 
2006 ----------
2007         1
2008 (1 row)
2009
2010 -- No. A-8-4-7
2011 SET pg_hint_plan.parse_messages TO info;
2012 SHOW pg_hint_plan.parse_messages;
2013  pg_hint_plan.parse_messages 
2014 -----------------------------
2015  info
2016 (1 row)
2017
2018 /*+Set*/SELECT 1;
2019 INFO:  hint syntax error at or near ""
2020 DETAIL:  Opening parenthesis is necessary.
2021  ?column? 
2022 ----------
2023         1
2024 (1 row)
2025
2026 SET client_min_messages TO notice;
2027 /*+Set*/SELECT 1;
2028 INFO:  hint syntax error at or near ""
2029 DETAIL:  Opening parenthesis is necessary.
2030  ?column? 
2031 ----------
2032         1
2033 (1 row)
2034
2035 -- No. A-8-4-8
2036 SET pg_hint_plan.parse_messages TO notice;
2037 SHOW pg_hint_plan.parse_messages;
2038  pg_hint_plan.parse_messages 
2039 -----------------------------
2040  notice
2041 (1 row)
2042
2043 /*+Set*/SELECT 1;
2044 NOTICE:  hint syntax error at or near ""
2045 DETAIL:  Opening parenthesis is necessary.
2046  ?column? 
2047 ----------
2048         1
2049 (1 row)
2050
2051 SET client_min_messages TO warning;
2052 /*+Set*/SELECT 1;
2053  ?column? 
2054 ----------
2055         1
2056 (1 row)
2057
2058 -- No. A-8-4-9
2059 SET pg_hint_plan.parse_messages TO warning;
2060 SHOW pg_hint_plan.parse_messages;
2061  pg_hint_plan.parse_messages 
2062 -----------------------------
2063  warning
2064 (1 row)
2065
2066 /*+Set*/SELECT 1;
2067 WARNING:  hint syntax error at or near ""
2068 DETAIL:  Opening parenthesis is necessary.
2069  ?column? 
2070 ----------
2071         1
2072 (1 row)
2073
2074 SET client_min_messages TO error;
2075 /*+Set*/SELECT 1;
2076  ?column? 
2077 ----------
2078         1
2079 (1 row)
2080
2081 -- No. A-8-4-10
2082 SET pg_hint_plan.parse_messages TO error;
2083 SHOW pg_hint_plan.parse_messages;
2084  pg_hint_plan.parse_messages 
2085 -----------------------------
2086  error
2087 (1 row)
2088
2089 /*+Set*/SELECT 1;
2090 ERROR:  hint syntax error at or near ""
2091 DETAIL:  Opening parenthesis is necessary.
2092 SET client_min_messages TO fatal;
2093 /*+Set*/SELECT 1;
2094 -- No. A-8-4-11
2095 RESET client_min_messages;
2096 SET pg_hint_plan.parse_messages TO DEFAULT;
2097 SHOW pg_hint_plan.parse_messages;
2098  pg_hint_plan.parse_messages 
2099 -----------------------------
2100  info
2101 (1 row)
2102
2103 /*+Set*/SELECT 1;
2104 INFO:  hint syntax error at or near ""
2105 DETAIL:  Opening parenthesis is necessary.
2106  ?column? 
2107 ----------
2108         1
2109 (1 row)
2110
2111 -- No. A-8-4-12
2112 SET pg_hint_plan.parse_messages TO fatal;
2113 ERROR:  invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2114 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2115 SHOW pg_hint_plan.parse_messages;
2116  pg_hint_plan.parse_messages 
2117 -----------------------------
2118  info
2119 (1 row)
2120
2121 -- No. A-8-4-13
2122 SET pg_hint_plan.parse_messages TO panic;
2123 ERROR:  invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2124 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2125 SHOW pg_hint_plan.parse_messages;
2126  pg_hint_plan.parse_messages 
2127 -----------------------------
2128  info
2129 (1 row)
2130
2131 -- No. A-8-4-14
2132 SET pg_hint_plan.parse_messages TO on;
2133 ERROR:  invalid value for parameter "pg_hint_plan.parse_messages": "on"
2134 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2135 SHOW pg_hint_plan.parse_messages;
2136  pg_hint_plan.parse_messages 
2137 -----------------------------
2138  info
2139 (1 row)
2140
2141 ----
2142 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
2143 ----
2144
2145 -- No. A-8-5-1
2146
2147 -- No. A-8-5-2
2148
2149 -- No. A-8-5-3
2150
2151 -- No. A-8-5-4
2152
2153 ----
2154 ---- No. A-9-1 parse error message output
2155 ----
2156 -- No. A-9-1-1
2157 /*+"Set"(enable_indexscan on)*/SELECT 1;
2158 INFO:  hint syntax error at or near ""Set"(enable_indexscan on)"
2159 DETAIL:  Unrecognized hint keyword ""Set"".
2160  ?column? 
2161 ----------
2162         1
2163 (1 row)
2164
2165 /*+Set()(enable_indexscan on)*/SELECT 1;
2166 INFO:  hint syntax error at or near "Set()(enable_indexscan on)"
2167 DETAIL:  Set hint requires name and value of GUC parameter.
2168 INFO:  hint syntax error at or near "(enable_indexscan on)"
2169 DETAIL:  Unrecognized hint keyword "".
2170  ?column? 
2171 ----------
2172         1
2173 (1 row)
2174
2175 /*+Set(enable_indexscan on*/SELECT 1;
2176 INFO:  hint syntax error at or near ""
2177 DETAIL:  Closing parenthesis is necessary.
2178  ?column? 
2179 ----------
2180         1
2181 (1 row)
2182
2183 ----
2184 ---- No. A-9-3 hint state output
2185 ----
2186 SET pg_hint_plan.debug_print TO on;
2187 SET client_min_messages TO LOG;
2188 -- No. A-9-3-1
2189 /*+SeqScan(t1)*/
2190 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2191 LOG:  pg_hint_plan:
2192 used hint:
2193 SeqScan(t1)
2194 not used hint:
2195 duplication hint:
2196 error hint:
2197
2198      QUERY PLAN     
2199 --------------------
2200  Seq Scan on t1
2201    Filter: (c1 = 1)
2202 (2 rows)
2203
2204 -- No. A-9-3-2
2205 /*+SeqScan(no_table)*/
2206 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2207 LOG:  pg_hint_plan:
2208 used hint:
2209 not used hint:
2210 SeqScan(no_table)
2211 duplication hint:
2212 error hint:
2213
2214           QUERY PLAN          
2215 ------------------------------
2216  Index Scan using t1_i1 on t1
2217    Index Cond: (c1 = 1)
2218 (2 rows)
2219
2220 -- No. A-9-3-3
2221 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2222             QUERY PLAN             
2223 -----------------------------------
2224  Tid Scan on t1
2225    TID Cond: (ctid = '(1,1)'::tid)
2226    Filter: (c1 = 1)
2227 (3 rows)
2228
2229 /*+TidScan(t1)BitmapScan(t1)*/
2230 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2231 INFO:  hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2232 DETAIL:  Conflict scan method hint.
2233 LOG:  pg_hint_plan:
2234 used hint:
2235 BitmapScan(t1)
2236 not used hint:
2237 duplication hint:
2238 TidScan(t1)
2239 error hint:
2240
2241             QUERY PLAN            
2242 ----------------------------------
2243  Bitmap Heap Scan on t1
2244    Recheck Cond: (c1 = 1)
2245    Filter: (ctid = '(1,1)'::tid)
2246    ->  Bitmap Index Scan on t1_i1
2247          Index Cond: (c1 = 1)
2248 (5 rows)
2249
2250 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2251 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2252 INFO:  hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2253 DETAIL:  Conflict scan method hint.
2254 INFO:  hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2255 DETAIL:  Conflict scan method hint.
2256 LOG:  pg_hint_plan:
2257 used hint:
2258 IndexScan(t1)
2259 not used hint:
2260 duplication hint:
2261 TidScan(t1)
2262 BitmapScan(t1)
2263 error hint:
2264
2265            QUERY PLAN            
2266 ---------------------------------
2267  Index Scan using t1_i1 on t1
2268    Index Cond: (c1 = 1)
2269    Filter: (ctid = '(1,1)'::tid)
2270 (3 rows)
2271
2272 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2273 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2274 INFO:  hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2275 DETAIL:  Conflict scan method hint.
2276 INFO:  hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2277 DETAIL:  Conflict scan method hint.
2278 INFO:  hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2279 DETAIL:  Conflict scan method hint.
2280 LOG:  pg_hint_plan:
2281 used hint:
2282 SeqScan(t1)
2283 not used hint:
2284 duplication hint:
2285 TidScan(t1)
2286 BitmapScan(t1)
2287 IndexScan(t1)
2288 error hint:
2289
2290                    QUERY PLAN                   
2291 ------------------------------------------------
2292  Seq Scan on t1
2293    Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2294 (2 rows)
2295
2296 -- No. A-9-3-4
2297 /*+Set(enable_indexscan enable)*/
2298 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2299 INFO:  parameter "enable_indexscan" requires a Boolean value
2300 LOG:  pg_hint_plan:
2301 used hint:
2302 not used hint:
2303 duplication hint:
2304 error hint:
2305 Set(enable_indexscan enable)
2306
2307           QUERY PLAN          
2308 ------------------------------
2309  Index Scan using t1_i1 on t1
2310    Index Cond: (c1 = 1)
2311 (2 rows)
2312
2313 ----
2314 ---- No. A-10-1 hint state output
2315 ----
2316 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2317 EXPLAIN (COSTS false) EXECUTE p1;
2318           QUERY PLAN          
2319 ------------------------------
2320  Index Scan using t1_i1 on t1
2321    Index Cond: (c1 = 1)
2322 (2 rows)
2323
2324 DEALLOCATE p1;
2325 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2326 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2327      QUERY PLAN      
2328 ---------------------
2329  Seq Scan on t1
2330    Filter: (c1 < $1)
2331 (2 rows)
2332
2333 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2334      QUERY PLAN      
2335 ---------------------
2336  Seq Scan on t1
2337    Filter: (c1 < $1)
2338 (2 rows)
2339
2340 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2341      QUERY PLAN      
2342 ---------------------
2343  Seq Scan on t1
2344    Filter: (c1 < $1)
2345 (2 rows)
2346
2347 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2348      QUERY PLAN      
2349 ---------------------
2350  Seq Scan on t1
2351    Filter: (c1 < $1)
2352 (2 rows)
2353
2354 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2355      QUERY PLAN      
2356 ---------------------
2357  Seq Scan on t1
2358    Filter: (c1 < $1)
2359 (2 rows)
2360
2361 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2362      QUERY PLAN      
2363 ---------------------
2364  Seq Scan on t1
2365    Filter: (c1 < $1)
2366 (2 rows)
2367
2368 DEALLOCATE p1;
2369 -- No. A-10-1-1
2370 -- No. A-10-1-2
2371 /*+SeqScan(t1)*/
2372 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2373 LOG:  pg_hint_plan:
2374 used hint:
2375 SeqScan(t1)
2376 not used hint:
2377 duplication hint:
2378 error hint:
2379
2380 /*+BitmapScan(t1)*/
2381 EXPLAIN (COSTS false) EXECUTE p1;
2382      QUERY PLAN     
2383 --------------------
2384  Seq Scan on t1
2385    Filter: (c1 = 1)
2386 (2 rows)
2387
2388 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2389 /*+BitmapScan(t1)*/
2390 EXPLAIN (COSTS false) EXECUTE p1;
2391 LOG:  pg_hint_plan:
2392 used hint:
2393 SeqScan(t1)
2394 not used hint:
2395 duplication hint:
2396 error hint:
2397
2398      QUERY PLAN     
2399 --------------------
2400  Seq Scan on t1
2401    Filter: (c1 = 1)
2402 (2 rows)
2403
2404 DEALLOCATE p1;
2405 /*+BitmapScan(t1)*/
2406 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2407 LOG:  pg_hint_plan:
2408 used hint:
2409 BitmapScan(t1)
2410 not used hint:
2411 duplication hint:
2412 error hint:
2413
2414 /*+SeqScan(t1)*/
2415 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2416             QUERY PLAN            
2417 ----------------------------------
2418  Bitmap Heap Scan on t1
2419    Recheck Cond: (c1 < $1)
2420    ->  Bitmap Index Scan on t1_i1
2421          Index Cond: (c1 < $1)
2422 (4 rows)
2423
2424 /*+SeqScan(t1)*/
2425 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2426             QUERY PLAN            
2427 ----------------------------------
2428  Bitmap Heap Scan on t1
2429    Recheck Cond: (c1 < $1)
2430    ->  Bitmap Index Scan on t1_i1
2431          Index Cond: (c1 < $1)
2432 (4 rows)
2433
2434 /*+SeqScan(t1)*/
2435 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2436             QUERY PLAN            
2437 ----------------------------------
2438  Bitmap Heap Scan on t1
2439    Recheck Cond: (c1 < $1)
2440    ->  Bitmap Index Scan on t1_i1
2441          Index Cond: (c1 < $1)
2442 (4 rows)
2443
2444 /*+SeqScan(t1)*/
2445 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2446             QUERY PLAN            
2447 ----------------------------------
2448  Bitmap Heap Scan on t1
2449    Recheck Cond: (c1 < $1)
2450    ->  Bitmap Index Scan on t1_i1
2451          Index Cond: (c1 < $1)
2452 (4 rows)
2453
2454 /*+SeqScan(t1)*/
2455 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2456             QUERY PLAN            
2457 ----------------------------------
2458  Bitmap Heap Scan on t1
2459    Recheck Cond: (c1 < $1)
2460    ->  Bitmap Index Scan on t1_i1
2461          Index Cond: (c1 < $1)
2462 (4 rows)
2463
2464 /*+SeqScan(t1)*/
2465 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2466             QUERY PLAN            
2467 ----------------------------------
2468  Bitmap Heap Scan on t1
2469    Recheck Cond: (c1 < $1)
2470    ->  Bitmap Index Scan on t1_i1
2471          Index Cond: (c1 < $1)
2472 (4 rows)
2473
2474 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2475 /*+SeqScan(t1)*/
2476 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2477 LOG:  pg_hint_plan:
2478 used hint:
2479 BitmapScan(t1)
2480 not used hint:
2481 duplication hint:
2482 error hint:
2483
2484             QUERY PLAN            
2485 ----------------------------------
2486  Bitmap Heap Scan on t1
2487    Recheck Cond: (c1 < $1)
2488    ->  Bitmap Index Scan on t1_i1
2489          Index Cond: (c1 < $1)
2490 (4 rows)
2491
2492 DEALLOCATE p1;
2493 -- No. A-10-1-3
2494 -- No. A-10-1-4
2495 /*+SeqScan(t1)*/
2496 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2497 LOG:  pg_hint_plan:
2498 used hint:
2499 SeqScan(t1)
2500 not used hint:
2501 duplication hint:
2502 error hint:
2503
2504 EXPLAIN (COSTS false) EXECUTE p1;
2505      QUERY PLAN     
2506 --------------------
2507  Seq Scan on t1
2508    Filter: (c1 = 1)
2509 (2 rows)
2510
2511 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2512 EXPLAIN (COSTS false) EXECUTE p1;
2513 LOG:  pg_hint_plan:
2514 used hint:
2515 SeqScan(t1)
2516 not used hint:
2517 duplication hint:
2518 error hint:
2519
2520      QUERY PLAN     
2521 --------------------
2522  Seq Scan on t1
2523    Filter: (c1 = 1)
2524 (2 rows)
2525
2526 DEALLOCATE p1;
2527 /*+BitmapScan(t1)*/
2528 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2529 LOG:  pg_hint_plan:
2530 used hint:
2531 BitmapScan(t1)
2532 not used hint:
2533 duplication hint:
2534 error hint:
2535
2536 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2537             QUERY PLAN            
2538 ----------------------------------
2539  Bitmap Heap Scan on t1
2540    Recheck Cond: (c1 < $1)
2541    ->  Bitmap Index Scan on t1_i1
2542          Index Cond: (c1 < $1)
2543 (4 rows)
2544
2545 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2546             QUERY PLAN            
2547 ----------------------------------
2548  Bitmap Heap Scan on t1
2549    Recheck Cond: (c1 < $1)
2550    ->  Bitmap Index Scan on t1_i1
2551          Index Cond: (c1 < $1)
2552 (4 rows)
2553
2554 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2555             QUERY PLAN            
2556 ----------------------------------
2557  Bitmap Heap Scan on t1
2558    Recheck Cond: (c1 < $1)
2559    ->  Bitmap Index Scan on t1_i1
2560          Index Cond: (c1 < $1)
2561 (4 rows)
2562
2563 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2564             QUERY PLAN            
2565 ----------------------------------
2566  Bitmap Heap Scan on t1
2567    Recheck Cond: (c1 < $1)
2568    ->  Bitmap Index Scan on t1_i1
2569          Index Cond: (c1 < $1)
2570 (4 rows)
2571
2572 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2573             QUERY PLAN            
2574 ----------------------------------
2575  Bitmap Heap Scan on t1
2576    Recheck Cond: (c1 < $1)
2577    ->  Bitmap Index Scan on t1_i1
2578          Index Cond: (c1 < $1)
2579 (4 rows)
2580
2581 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2582             QUERY PLAN            
2583 ----------------------------------
2584  Bitmap Heap Scan on t1
2585    Recheck Cond: (c1 < $1)
2586    ->  Bitmap Index Scan on t1_i1
2587          Index Cond: (c1 < $1)
2588 (4 rows)
2589
2590 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2591 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2592 LOG:  pg_hint_plan:
2593 used hint:
2594 BitmapScan(t1)
2595 not used hint:
2596 duplication hint:
2597 error hint:
2598
2599             QUERY PLAN            
2600 ----------------------------------
2601  Bitmap Heap Scan on t1
2602    Recheck Cond: (c1 < $1)
2603    ->  Bitmap Index Scan on t1_i1
2604          Index Cond: (c1 < $1)
2605 (4 rows)
2606
2607 DEALLOCATE p1;
2608 -- No. A-10-1-5
2609 -- No. A-10-1-6
2610 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2611 /*+BitmapScan(t1)*/
2612 EXPLAIN (COSTS false) EXECUTE p1;
2613           QUERY PLAN          
2614 ------------------------------
2615  Index Scan using t1_i1 on t1
2616    Index Cond: (c1 = 1)
2617 (2 rows)
2618
2619 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2620 /*+BitmapScan(t1)*/
2621 EXPLAIN (COSTS false) EXECUTE p1;
2622           QUERY PLAN          
2623 ------------------------------
2624  Index Scan using t1_i1 on t1
2625    Index Cond: (c1 = 1)
2626 (2 rows)
2627
2628 DEALLOCATE p1;
2629 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2630 /*+BitmapScan(t1)*/
2631 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2632      QUERY PLAN      
2633 ---------------------
2634  Seq Scan on t1
2635    Filter: (c1 < $1)
2636 (2 rows)
2637
2638 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2639      QUERY PLAN      
2640 ---------------------
2641  Seq Scan on t1
2642    Filter: (c1 < $1)
2643 (2 rows)
2644
2645 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2646      QUERY PLAN      
2647 ---------------------
2648  Seq Scan on t1
2649    Filter: (c1 < $1)
2650 (2 rows)
2651
2652 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2653      QUERY PLAN      
2654 ---------------------
2655  Seq Scan on t1
2656    Filter: (c1 < $1)
2657 (2 rows)
2658
2659 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2660      QUERY PLAN      
2661 ---------------------
2662  Seq Scan on t1
2663    Filter: (c1 < $1)
2664 (2 rows)
2665
2666 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2667      QUERY PLAN      
2668 ---------------------
2669  Seq Scan on t1
2670    Filter: (c1 < $1)
2671 (2 rows)
2672
2673 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2674 /*+BitmapScan(t1)*/
2675 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2676      QUERY PLAN      
2677 ---------------------
2678  Seq Scan on t1
2679    Filter: (c1 < $1)
2680 (2 rows)
2681
2682 DEALLOCATE p1;
2683 -- No. A-10-1-9
2684 -- No. A-10-1-10
2685 /*+SeqScan(t1)*/
2686 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2687 LOG:  pg_hint_plan:
2688 used hint:
2689 SeqScan(t1)
2690 not used hint:
2691 duplication hint:
2692 error hint:
2693
2694 /*+BitmapScan(t1)*/
2695 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2696      QUERY PLAN     
2697 --------------------
2698  Seq Scan on t1
2699    Filter: (c1 = 1)
2700 (2 rows)
2701
2702 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2703 /*+BitmapScan(t1)*/
2704 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2705 LOG:  pg_hint_plan:
2706 used hint:
2707 SeqScan(t1)
2708 not used hint:
2709 duplication hint:
2710 error hint:
2711
2712      QUERY PLAN     
2713 --------------------
2714  Seq Scan on t1
2715    Filter: (c1 = 1)
2716 (2 rows)
2717
2718 DEALLOCATE p1;
2719 /*+BitmapScan(t1)*/
2720 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2721 LOG:  pg_hint_plan:
2722 used hint:
2723 BitmapScan(t1)
2724 not used hint:
2725 duplication hint:
2726 error hint:
2727
2728 /*+SeqScan(t1)*/
2729 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2730             QUERY PLAN            
2731 ----------------------------------
2732  Bitmap Heap Scan on t1
2733    Recheck Cond: (c1 < $1)
2734    ->  Bitmap Index Scan on t1_i1
2735          Index Cond: (c1 < $1)
2736 (4 rows)
2737
2738 /*+SeqScan(t1)*/
2739 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2740             QUERY PLAN            
2741 ----------------------------------
2742  Bitmap Heap Scan on t1
2743    Recheck Cond: (c1 < $1)
2744    ->  Bitmap Index Scan on t1_i1
2745          Index Cond: (c1 < $1)
2746 (4 rows)
2747
2748 /*+SeqScan(t1)*/
2749 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2750             QUERY PLAN            
2751 ----------------------------------
2752  Bitmap Heap Scan on t1
2753    Recheck Cond: (c1 < $1)
2754    ->  Bitmap Index Scan on t1_i1
2755          Index Cond: (c1 < $1)
2756 (4 rows)
2757
2758 /*+SeqScan(t1)*/
2759 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2760             QUERY PLAN            
2761 ----------------------------------
2762  Bitmap Heap Scan on t1
2763    Recheck Cond: (c1 < $1)
2764    ->  Bitmap Index Scan on t1_i1
2765          Index Cond: (c1 < $1)
2766 (4 rows)
2767
2768 /*+SeqScan(t1)*/
2769 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2770             QUERY PLAN            
2771 ----------------------------------
2772  Bitmap Heap Scan on t1
2773    Recheck Cond: (c1 < $1)
2774    ->  Bitmap Index Scan on t1_i1
2775          Index Cond: (c1 < $1)
2776 (4 rows)
2777
2778 /*+SeqScan(t1)*/
2779 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2780             QUERY PLAN            
2781 ----------------------------------
2782  Bitmap Heap Scan on t1
2783    Recheck Cond: (c1 < $1)
2784    ->  Bitmap Index Scan on t1_i1
2785          Index Cond: (c1 < $1)
2786 (4 rows)
2787
2788 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2789 /*+SeqScan(t1)*/
2790 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2791 LOG:  pg_hint_plan:
2792 used hint:
2793 BitmapScan(t1)
2794 not used hint:
2795 duplication hint:
2796 error hint:
2797
2798             QUERY PLAN            
2799 ----------------------------------
2800  Bitmap Heap Scan on t1
2801    Recheck Cond: (c1 < $1)
2802    ->  Bitmap Index Scan on t1_i1
2803          Index Cond: (c1 < $1)
2804 (4 rows)
2805
2806 DEALLOCATE p1;
2807 -- No. A-10-1-11
2808 -- No. A-10-1-12
2809 /*+SeqScan(t1)*/
2810 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2811 LOG:  pg_hint_plan:
2812 used hint:
2813 SeqScan(t1)
2814 not used hint:
2815 duplication hint:
2816 error hint:
2817
2818 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2819      QUERY PLAN     
2820 --------------------
2821  Seq Scan on t1
2822    Filter: (c1 = 1)
2823 (2 rows)
2824
2825 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2826 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2827 LOG:  pg_hint_plan:
2828 used hint:
2829 SeqScan(t1)
2830 not used hint:
2831 duplication hint:
2832 error hint:
2833
2834      QUERY PLAN     
2835 --------------------
2836  Seq Scan on t1
2837    Filter: (c1 = 1)
2838 (2 rows)
2839
2840 DEALLOCATE p1;
2841 /*+BitmapScan(t1)*/
2842 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2843 LOG:  pg_hint_plan:
2844 used hint:
2845 BitmapScan(t1)
2846 not used hint:
2847 duplication hint:
2848 error hint:
2849
2850 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2851             QUERY PLAN            
2852 ----------------------------------
2853  Bitmap Heap Scan on t1
2854    Recheck Cond: (c1 < $1)
2855    ->  Bitmap Index Scan on t1_i1
2856          Index Cond: (c1 < $1)
2857 (4 rows)
2858
2859 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2860             QUERY PLAN            
2861 ----------------------------------
2862  Bitmap Heap Scan on t1
2863    Recheck Cond: (c1 < $1)
2864    ->  Bitmap Index Scan on t1_i1
2865          Index Cond: (c1 < $1)
2866 (4 rows)
2867
2868 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2869             QUERY PLAN            
2870 ----------------------------------
2871  Bitmap Heap Scan on t1
2872    Recheck Cond: (c1 < $1)
2873    ->  Bitmap Index Scan on t1_i1
2874          Index Cond: (c1 < $1)
2875 (4 rows)
2876
2877 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2878             QUERY PLAN            
2879 ----------------------------------
2880  Bitmap Heap Scan on t1
2881    Recheck Cond: (c1 < $1)
2882    ->  Bitmap Index Scan on t1_i1
2883          Index Cond: (c1 < $1)
2884 (4 rows)
2885
2886 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2887             QUERY PLAN            
2888 ----------------------------------
2889  Bitmap Heap Scan on t1
2890    Recheck Cond: (c1 < $1)
2891    ->  Bitmap Index Scan on t1_i1
2892          Index Cond: (c1 < $1)
2893 (4 rows)
2894
2895 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2896             QUERY PLAN            
2897 ----------------------------------
2898  Bitmap Heap Scan on t1
2899    Recheck Cond: (c1 < $1)
2900    ->  Bitmap Index Scan on t1_i1
2901          Index Cond: (c1 < $1)
2902 (4 rows)
2903
2904 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2905 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2906 LOG:  pg_hint_plan:
2907 used hint:
2908 BitmapScan(t1)
2909 not used hint:
2910 duplication hint:
2911 error hint:
2912
2913             QUERY PLAN            
2914 ----------------------------------
2915  Bitmap Heap Scan on t1
2916    Recheck Cond: (c1 < $1)
2917    ->  Bitmap Index Scan on t1_i1
2918          Index Cond: (c1 < $1)
2919 (4 rows)
2920
2921 DEALLOCATE p1;
2922 -- No. A-10-1-13
2923 -- No. A-10-1-14
2924 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2925 /*+BitmapScan(t1)*/
2926 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2927           QUERY PLAN          
2928 ------------------------------
2929  Index Scan using t1_i1 on t1
2930    Index Cond: (c1 = 1)
2931 (2 rows)
2932
2933 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2934 /*+BitmapScan(t1)*/
2935 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2936           QUERY PLAN          
2937 ------------------------------
2938  Index Scan using t1_i1 on t1
2939    Index Cond: (c1 = 1)
2940 (2 rows)
2941
2942 DEALLOCATE p1;
2943 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2944 /*+BitmapScan(t1)*/
2945 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2946      QUERY PLAN      
2947 ---------------------
2948  Seq Scan on t1
2949    Filter: (c1 < $1)
2950 (2 rows)
2951
2952 /*+BitmapScan(t1)*/
2953 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2954      QUERY PLAN      
2955 ---------------------
2956  Seq Scan on t1
2957    Filter: (c1 < $1)
2958 (2 rows)
2959
2960 /*+BitmapScan(t1)*/
2961 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2962      QUERY PLAN      
2963 ---------------------
2964  Seq Scan on t1
2965    Filter: (c1 < $1)
2966 (2 rows)
2967
2968 /*+BitmapScan(t1)*/
2969 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2970      QUERY PLAN      
2971 ---------------------
2972  Seq Scan on t1
2973    Filter: (c1 < $1)
2974 (2 rows)
2975
2976 /*+BitmapScan(t1)*/
2977 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2978      QUERY PLAN      
2979 ---------------------
2980  Seq Scan on t1
2981    Filter: (c1 < $1)
2982 (2 rows)
2983
2984 /*+BitmapScan(t1)*/
2985 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2986      QUERY PLAN      
2987 ---------------------
2988  Seq Scan on t1
2989    Filter: (c1 < $1)
2990 (2 rows)
2991
2992 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2993 /*+BitmapScan(t1)*/
2994 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2995      QUERY PLAN      
2996 ---------------------
2997  Seq Scan on t1
2998    Filter: (c1 < $1)
2999 (2 rows)
3000
3001 DEALLOCATE p1;
3002 ----
3003 ---- No. A-10-4 EXECUTE statement name error
3004 ----
3005 -- No. A-10-4-1
3006 EXECUTE p1;
3007 ERROR:  prepared statement "p1" does not exist
3008 SHOW pg_hint_plan.debug_print;
3009  pg_hint_plan.debug_print 
3010 --------------------------
3011  on
3012 (1 row)
3013
3014 ----
3015 ---- No. A-11-5 EXECUTE statement name error
3016 ----
3017 -- No. A-11-5-1
3018 SELECT pg_stat_statements_reset();
3019  pg_stat_statements_reset 
3020 --------------------------
3021  
3022 (1 row)
3023
3024 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3025  c1 | c2 | c3 | c4 
3026 ----+----+----+----
3027   1 |  1 |  1 | 1
3028 (1 row)
3029
3030 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3031 LOG:  pg_hint_plan:
3032 used hint:
3033 Set(enable_seqscan off)
3034 not used hint:
3035 duplication hint:
3036 error hint:
3037
3038  c1 | c2 | c3 | c4 
3039 ----+----+----+----
3040   1 |  1 |  1 | 1
3041 (1 row)
3042
3043 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3044 LOG:  pg_hint_plan:
3045 used hint:
3046 SeqScan(t1)
3047 not used hint:
3048 duplication hint:
3049 error hint:
3050
3051  c1 | c2 | c3 | c4 
3052 ----+----+----+----
3053   1 |  1 |  1 | 1
3054 (1 row)
3055
3056 SELECT s.query, s.calls
3057   FROM public.pg_stat_statements s
3058   JOIN pg_catalog.pg_database d
3059     ON (s.dbid = d.oid)
3060  ORDER BY 1;
3061                                query                               | calls 
3062 -------------------------------------------------------------------+-------
3063  /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;             |     1
3064  /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; |     1
3065  SELECT * FROM s1.t1 WHERE t1.c1 = 1;                              |     1
3066  SELECT pg_stat_statements_reset();                                |     1
3067 (4 rows)
3068
3069 ----
3070 ---- No. A-12-1 reset of global variable of core at the error
3071 ---- No. A-12-2 reset of global variable of original at the error
3072 ----
3073 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3074              QUERY PLAN             
3075 ------------------------------------
3076  Merge Join
3077    Merge Cond: (t1.c1 = t2.c1)
3078    ->  Index Scan using t1_i1 on t1
3079    ->  Sort
3080          Sort Key: t2.c1
3081          ->  Seq Scan on t2
3082 (6 rows)
3083
3084 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3085 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3086 INFO:  hint syntax error at or near "NestLoop(t1 t1)"
3087 DETAIL:  Relation name "t1" is duplicated.
3088 LOG:  pg_hint_plan:
3089 used hint:
3090 SeqScan(t1)
3091 MergeJoin(t1 t2)
3092 Set(enable_seqscan off)
3093 Set(geqo_threshold 100)
3094 not used hint:
3095 duplication hint:
3096 error hint:
3097 NestLoop(t1 t1)
3098
3099 EXPLAIN (COSTS false) EXECUTE p1;
3100              QUERY PLAN             
3101 ------------------------------------
3102  Merge Join
3103    Merge Cond: (t1.c1 = t2.c1)
3104    ->  Sort
3105          Sort Key: t1.c1
3106          ->  Seq Scan on t1
3107    ->  Index Scan using t2_i1 on t2
3108 (6 rows)
3109
3110 -- No. A-12-1-1
3111 -- No. A-12-2-1
3112 SELECT name, setting FROM settings;
3113            name            |  setting  
3114 ---------------------------+-----------
3115  geqo                      | on
3116  geqo_effort               | 5
3117  geqo_generations          | 0
3118  geqo_pool_size            | 0
3119  geqo_seed                 | 0
3120  geqo_selection_bias       | 2
3121  geqo_threshold            | 12
3122  constraint_exclusion      | partition
3123  cursor_tuple_fraction     | 0.1
3124  default_statistics_target | 100
3125  from_collapse_limit       | 8
3126  join_collapse_limit       | 8
3127  cpu_index_tuple_cost      | 0.005
3128  cpu_operator_cost         | 0.0025
3129  cpu_tuple_cost            | 0.01
3130  effective_cache_size      | 16384
3131  random_page_cost          | 4
3132  seq_page_cost             | 1
3133  enable_bitmapscan         | on
3134  enable_hashagg            | on
3135  enable_hashjoin           | on
3136  enable_indexscan          | on
3137  enable_material           | on
3138  enable_mergejoin          | on
3139  enable_nestloop           | on
3140  enable_seqscan            | on
3141  enable_sort               | on
3142  enable_tidscan            | on
3143  client_min_messages       | log
3144 (29 rows)
3145
3146 SET pg_hint_plan.parse_messages TO error;
3147 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3148 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3149 ERROR:  hint syntax error at or near "NestLoop(t1 t1)"
3150 DETAIL:  Relation name "t1" is duplicated.
3151 SELECT name, setting FROM settings;
3152            name            |  setting  
3153 ---------------------------+-----------
3154  geqo                      | on
3155  geqo_effort               | 5
3156  geqo_generations          | 0
3157  geqo_pool_size            | 0
3158  geqo_seed                 | 0
3159  geqo_selection_bias       | 2
3160  geqo_threshold            | 12
3161  constraint_exclusion      | partition
3162  cursor_tuple_fraction     | 0.1
3163  default_statistics_target | 100
3164  from_collapse_limit       | 8
3165  join_collapse_limit       | 8
3166  cpu_index_tuple_cost      | 0.005
3167  cpu_operator_cost         | 0.0025
3168  cpu_tuple_cost            | 0.01
3169  effective_cache_size      | 16384
3170  random_page_cost          | 4
3171  seq_page_cost             | 1
3172  enable_bitmapscan         | on
3173  enable_hashagg            | on
3174  enable_hashjoin           | on
3175  enable_indexscan          | on
3176  enable_material           | on
3177  enable_mergejoin          | on
3178  enable_nestloop           | on
3179  enable_seqscan            | on
3180  enable_sort               | on
3181  enable_tidscan            | on
3182  client_min_messages       | log
3183 (29 rows)
3184
3185 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3186 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3187 LOG:  pg_hint_plan:
3188 used hint:
3189 SeqScan(t1)
3190 MergeJoin(t1 t2)
3191 Set(enable_seqscan off)
3192 Set(geqo_threshold 100)
3193 not used hint:
3194 duplication hint:
3195 error hint:
3196
3197              QUERY PLAN             
3198 ------------------------------------
3199  Merge Join
3200    Merge Cond: (t1.c1 = t2.c1)
3201    ->  Sort
3202          Sort Key: t1.c1
3203          ->  Seq Scan on t1
3204    ->  Index Scan using t2_i1 on t2
3205 (6 rows)
3206
3207 -- No. A-12-1-2
3208 -- No. A-12-2-2
3209 SELECT name, setting FROM settings;
3210            name            |  setting  
3211 ---------------------------+-----------
3212  geqo                      | on
3213  geqo_effort               | 5
3214  geqo_generations          | 0
3215  geqo_pool_size            | 0
3216  geqo_seed                 | 0
3217  geqo_selection_bias       | 2
3218  geqo_threshold            | 12
3219  constraint_exclusion      | partition
3220  cursor_tuple_fraction     | 0.1
3221  default_statistics_target | 100
3222  from_collapse_limit       | 8
3223  join_collapse_limit       | 8
3224  cpu_index_tuple_cost      | 0.005
3225  cpu_operator_cost         | 0.0025
3226  cpu_tuple_cost            | 0.01
3227  effective_cache_size      | 16384
3228  random_page_cost          | 4
3229  seq_page_cost             | 1
3230  enable_bitmapscan         | on
3231  enable_hashagg            | on
3232  enable_hashjoin           | on
3233  enable_indexscan          | on
3234  enable_material           | on
3235  enable_mergejoin          | on
3236  enable_nestloop           | on
3237  enable_seqscan            | on
3238  enable_sort               | on
3239  enable_tidscan            | on
3240  client_min_messages       | log
3241 (29 rows)
3242
3243 SET pg_hint_plan.parse_messages TO error;
3244 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3245 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3246 ERROR:  hint syntax error at or near "NestLoop(t1 t1)"
3247 DETAIL:  Relation name "t1" is duplicated.
3248 SELECT name, setting FROM settings;
3249            name            |  setting  
3250 ---------------------------+-----------
3251  geqo                      | on
3252  geqo_effort               | 5
3253  geqo_generations          | 0
3254  geqo_pool_size            | 0
3255  geqo_seed                 | 0
3256  geqo_selection_bias       | 2
3257  geqo_threshold            | 12
3258  constraint_exclusion      | partition
3259  cursor_tuple_fraction     | 0.1
3260  default_statistics_target | 100
3261  from_collapse_limit       | 8
3262  join_collapse_limit       | 8
3263  cpu_index_tuple_cost      | 0.005
3264  cpu_operator_cost         | 0.0025
3265  cpu_tuple_cost            | 0.01
3266  effective_cache_size      | 16384
3267  random_page_cost          | 4
3268  seq_page_cost             | 1
3269  enable_bitmapscan         | on
3270  enable_hashagg            | on
3271  enable_hashjoin           | on
3272  enable_indexscan          | on
3273  enable_material           | on
3274  enable_mergejoin          | on
3275  enable_nestloop           | on
3276  enable_seqscan            | on
3277  enable_sort               | on
3278  enable_tidscan            | on
3279  client_min_messages       | log
3280 (29 rows)
3281
3282 EXPLAIN (COSTS false) EXECUTE p1;
3283              QUERY PLAN             
3284 ------------------------------------
3285  Merge Join
3286    Merge Cond: (t1.c1 = t2.c1)
3287    ->  Sort
3288          Sort Key: t1.c1
3289          ->  Seq Scan on t1
3290    ->  Index Scan using t2_i1 on t2
3291 (6 rows)
3292
3293 -- No. A-12-1-3
3294 -- No. A-12-2-3
3295 SELECT name, setting FROM settings;
3296            name            |  setting  
3297 ---------------------------+-----------
3298  geqo                      | on
3299  geqo_effort               | 5
3300  geqo_generations          | 0
3301  geqo_pool_size            | 0
3302  geqo_seed                 | 0
3303  geqo_selection_bias       | 2
3304  geqo_threshold            | 12
3305  constraint_exclusion      | partition
3306  cursor_tuple_fraction     | 0.1
3307  default_statistics_target | 100
3308  from_collapse_limit       | 8
3309  join_collapse_limit       | 8
3310  cpu_index_tuple_cost      | 0.005
3311  cpu_operator_cost         | 0.0025
3312  cpu_tuple_cost            | 0.01
3313  effective_cache_size      | 16384
3314  random_page_cost          | 4
3315  seq_page_cost             | 1
3316  enable_bitmapscan         | on
3317  enable_hashagg            | on
3318  enable_hashjoin           | on
3319  enable_indexscan          | on
3320  enable_material           | on
3321  enable_mergejoin          | on
3322  enable_nestloop           | on
3323  enable_seqscan            | on
3324  enable_sort               | on
3325  enable_tidscan            | on
3326  client_min_messages       | log
3327 (29 rows)
3328
3329 SET pg_hint_plan.parse_messages TO error;
3330 EXPLAIN (COSTS false) EXECUTE p2;
3331 ERROR:  prepared statement "p2" does not exist
3332 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3333 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3334 LOG:  pg_hint_plan:
3335 used hint:
3336 SeqScan(t1)
3337 MergeJoin(t1 t2)
3338 Set(enable_seqscan off)
3339 Set(geqo_threshold 100)
3340 not used hint:
3341 duplication hint:
3342 error hint:
3343
3344              QUERY PLAN             
3345 ------------------------------------
3346  Merge Join
3347    Merge Cond: (t1.c1 = t2.c1)
3348    ->  Sort
3349          Sort Key: t1.c1
3350          ->  Seq Scan on t1
3351    ->  Index Scan using t2_i1 on t2
3352 (6 rows)
3353
3354 EXPLAIN (COSTS false) EXECUTE p1;
3355              QUERY PLAN             
3356 ------------------------------------
3357  Merge Join
3358    Merge Cond: (t1.c1 = t2.c1)
3359    ->  Sort
3360          Sort Key: t1.c1
3361          ->  Seq Scan on t1
3362    ->  Index Scan using t2_i1 on t2
3363 (6 rows)
3364
3365 SELECT name, setting FROM settings;
3366            name            |  setting  
3367 ---------------------------+-----------
3368  geqo                      | on
3369  geqo_effort               | 5
3370  geqo_generations          | 0
3371  geqo_pool_size            | 0
3372  geqo_seed                 | 0
3373  geqo_selection_bias       | 2
3374  geqo_threshold            | 12
3375  constraint_exclusion      | partition
3376  cursor_tuple_fraction     | 0.1
3377  default_statistics_target | 100
3378  from_collapse_limit       | 8
3379  join_collapse_limit       | 8
3380  cpu_index_tuple_cost      | 0.005
3381  cpu_operator_cost         | 0.0025
3382  cpu_tuple_cost            | 0.01
3383  effective_cache_size      | 16384
3384  random_page_cost          | 4
3385  seq_page_cost             | 1
3386  enable_bitmapscan         | on
3387  enable_hashagg            | on
3388  enable_hashjoin           | on
3389  enable_indexscan          | on
3390  enable_material           | on
3391  enable_mergejoin          | on
3392  enable_nestloop           | on
3393  enable_seqscan            | on
3394  enable_sort               | on
3395  enable_tidscan            | on
3396  client_min_messages       | log
3397 (29 rows)
3398
3399 -- No. A-12-1-4
3400 -- No. A-12-2-4
3401 SELECT name, setting FROM settings;
3402            name            |  setting  
3403 ---------------------------+-----------
3404  geqo                      | on
3405  geqo_effort               | 5
3406  geqo_generations          | 0
3407  geqo_pool_size            | 0
3408  geqo_seed                 | 0
3409  geqo_selection_bias       | 2
3410  geqo_threshold            | 12
3411  constraint_exclusion      | partition
3412  cursor_tuple_fraction     | 0.1
3413  default_statistics_target | 100
3414  from_collapse_limit       | 8
3415  join_collapse_limit       | 8
3416  cpu_index_tuple_cost      | 0.005
3417  cpu_operator_cost         | 0.0025
3418  cpu_tuple_cost            | 0.01
3419  effective_cache_size      | 16384
3420  random_page_cost          | 4
3421  seq_page_cost             | 1
3422  enable_bitmapscan         | on
3423  enable_hashagg            | on
3424  enable_hashjoin           | on
3425  enable_indexscan          | on
3426  enable_material           | on
3427  enable_mergejoin          | on
3428  enable_nestloop           | on
3429  enable_seqscan            | on
3430  enable_sort               | on
3431  enable_tidscan            | on
3432  client_min_messages       | log
3433 (29 rows)
3434
3435 SET pg_hint_plan.parse_messages TO error;
3436 EXPLAIN (COSTS false) EXECUTE p2;
3437 ERROR:  prepared statement "p2" does not exist
3438 EXPLAIN (COSTS false) EXECUTE p1;
3439              QUERY PLAN             
3440 ------------------------------------
3441  Merge Join
3442    Merge Cond: (t1.c1 = t2.c1)
3443    ->  Sort
3444          Sort Key: t1.c1
3445          ->  Seq Scan on t1
3446    ->  Index Scan using t2_i1 on t2
3447 (6 rows)
3448
3449 SELECT name, setting FROM settings;
3450            name            |  setting  
3451 ---------------------------+-----------
3452  geqo                      | on
3453  geqo_effort               | 5
3454  geqo_generations          | 0
3455  geqo_pool_size            | 0
3456  geqo_seed                 | 0
3457  geqo_selection_bias       | 2
3458  geqo_threshold            | 12
3459  constraint_exclusion      | partition
3460  cursor_tuple_fraction     | 0.1
3461  default_statistics_target | 100
3462  from_collapse_limit       | 8
3463  join_collapse_limit       | 8
3464  cpu_index_tuple_cost      | 0.005
3465  cpu_operator_cost         | 0.0025
3466  cpu_tuple_cost            | 0.01
3467  effective_cache_size      | 16384
3468  random_page_cost          | 4
3469  seq_page_cost             | 1
3470  enable_bitmapscan         | on
3471  enable_hashagg            | on
3472  enable_hashjoin           | on
3473  enable_indexscan          | on
3474  enable_material           | on
3475  enable_mergejoin          | on
3476  enable_nestloop           | on
3477  enable_seqscan            | on
3478  enable_sort               | on
3479  enable_tidscan            | on
3480  client_min_messages       | log
3481 (29 rows)
3482
3483 DEALLOCATE p1;
3484 SET pg_hint_plan.parse_messages TO LOG;
3485 ----
3486 ---- No. A-12-3 effective range of the hint
3487 ----
3488 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3489              QUERY PLAN             
3490 ------------------------------------
3491  Merge Join
3492    Merge Cond: (t1.c1 = t2.c1)
3493    ->  Index Scan using t1_i1 on t1
3494    ->  Sort
3495          Sort Key: t2.c1
3496          ->  Seq Scan on t2
3497 (6 rows)
3498
3499 -- No. A-12-3-1
3500 SET enable_indexscan TO off;
3501 SET enable_mergejoin TO off;
3502 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3503           QUERY PLAN          
3504 ------------------------------
3505  Hash Join
3506    Hash Cond: (t1.c1 = t2.c1)
3507    ->  Seq Scan on t1
3508    ->  Hash
3509          ->  Seq Scan on t2
3510 (5 rows)
3511
3512 SELECT name, setting FROM settings;
3513            name            |  setting  
3514 ---------------------------+-----------
3515  geqo                      | on
3516  geqo_effort               | 5
3517  geqo_generations          | 0
3518  geqo_pool_size            | 0
3519  geqo_seed                 | 0
3520  geqo_selection_bias       | 2
3521  geqo_threshold            | 12
3522  constraint_exclusion      | partition
3523  cursor_tuple_fraction     | 0.1
3524  default_statistics_target | 100
3525  from_collapse_limit       | 8
3526  join_collapse_limit       | 8
3527  cpu_index_tuple_cost      | 0.005
3528  cpu_operator_cost         | 0.0025
3529  cpu_tuple_cost            | 0.01
3530  effective_cache_size      | 16384
3531  random_page_cost          | 4
3532  seq_page_cost             | 1
3533  enable_bitmapscan         | on
3534  enable_hashagg            | on
3535  enable_hashjoin           | on
3536  enable_indexscan          | off
3537  enable_material           | on
3538  enable_mergejoin          | off
3539  enable_nestloop           | on
3540  enable_seqscan            | on
3541  enable_sort               | on
3542  enable_tidscan            | on
3543  client_min_messages       | log
3544 (29 rows)
3545
3546 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3547 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3548 LOG:  pg_hint_plan:
3549 used hint:
3550 IndexScan(t2)
3551 MergeJoin(t1 t2)
3552 Leading(t2 t1)
3553 Set(enable_indexscan on)
3554 Set(geqo_threshold 100)
3555 not used hint:
3556 duplication hint:
3557 error hint:
3558
3559              QUERY PLAN             
3560 ------------------------------------
3561  Merge Join
3562    Merge Cond: (t1.c1 = t2.c1)
3563    ->  Index Scan using t1_i1 on t1
3564    ->  Index Scan using t2_i1 on t2
3565 (4 rows)
3566
3567 SELECT name, setting FROM settings;
3568            name            |  setting  
3569 ---------------------------+-----------
3570  geqo                      | on
3571  geqo_effort               | 5
3572  geqo_generations          | 0
3573  geqo_pool_size            | 0
3574  geqo_seed                 | 0
3575  geqo_selection_bias       | 2
3576  geqo_threshold            | 12
3577  constraint_exclusion      | partition
3578  cursor_tuple_fraction     | 0.1
3579  default_statistics_target | 100
3580  from_collapse_limit       | 8
3581  join_collapse_limit       | 8
3582  cpu_index_tuple_cost      | 0.005
3583  cpu_operator_cost         | 0.0025
3584  cpu_tuple_cost            | 0.01
3585  effective_cache_size      | 16384
3586  random_page_cost          | 4
3587  seq_page_cost             | 1
3588  enable_bitmapscan         | on
3589  enable_hashagg            | on
3590  enable_hashjoin           | on
3591  enable_indexscan          | off
3592  enable_material           | on
3593  enable_mergejoin          | off
3594  enable_nestloop           | on
3595  enable_seqscan            | on
3596  enable_sort               | on
3597  enable_tidscan            | on
3598  client_min_messages       | log
3599 (29 rows)
3600
3601 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3602           QUERY PLAN          
3603 ------------------------------
3604  Hash Join
3605    Hash Cond: (t1.c1 = t2.c1)
3606    ->  Seq Scan on t1
3607    ->  Hash
3608          ->  Seq Scan on t2
3609 (5 rows)
3610
3611 -- No. A-12-3-2
3612 SET enable_indexscan TO off;
3613 SET enable_mergejoin TO off;
3614 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3615           QUERY PLAN          
3616 ------------------------------
3617  Hash Join
3618    Hash Cond: (t1.c1 = t2.c1)
3619    ->  Seq Scan on t1
3620    ->  Hash
3621          ->  Seq Scan on t2
3622 (5 rows)
3623
3624 SELECT name, setting FROM settings;
3625            name            |  setting  
3626 ---------------------------+-----------
3627  geqo                      | on
3628  geqo_effort               | 5
3629  geqo_generations          | 0
3630  geqo_pool_size            | 0
3631  geqo_seed                 | 0
3632  geqo_selection_bias       | 2
3633  geqo_threshold            | 12
3634  constraint_exclusion      | partition
3635  cursor_tuple_fraction     | 0.1
3636  default_statistics_target | 100
3637  from_collapse_limit       | 8
3638  join_collapse_limit       | 8
3639  cpu_index_tuple_cost      | 0.005
3640  cpu_operator_cost         | 0.0025
3641  cpu_tuple_cost            | 0.01
3642  effective_cache_size      | 16384
3643  random_page_cost          | 4
3644  seq_page_cost             | 1
3645  enable_bitmapscan         | on
3646  enable_hashagg            | on
3647  enable_hashjoin           | on
3648  enable_indexscan          | off
3649  enable_material           | on
3650  enable_mergejoin          | off
3651  enable_nestloop           | on
3652  enable_seqscan            | on
3653  enable_sort               | on
3654  enable_tidscan            | on
3655  client_min_messages       | log
3656 (29 rows)
3657
3658 BEGIN;
3659 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3660 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3661 LOG:  pg_hint_plan:
3662 used hint:
3663 IndexScan(t2)
3664 MergeJoin(t1 t2)
3665 Leading(t2 t1)
3666 Set(enable_indexscan on)
3667 Set(geqo_threshold 100)
3668 not used hint:
3669 duplication hint:
3670 error hint:
3671
3672              QUERY PLAN             
3673 ------------------------------------
3674  Merge Join
3675    Merge Cond: (t1.c1 = t2.c1)
3676    ->  Index Scan using t1_i1 on t1
3677    ->  Index Scan using t2_i1 on t2
3678 (4 rows)
3679
3680 COMMIT;
3681 BEGIN;
3682 SELECT name, setting FROM settings;
3683            name            |  setting  
3684 ---------------------------+-----------
3685  geqo                      | on
3686  geqo_effort               | 5
3687  geqo_generations          | 0
3688  geqo_pool_size            | 0
3689  geqo_seed                 | 0
3690  geqo_selection_bias       | 2
3691  geqo_threshold            | 12
3692  constraint_exclusion      | partition
3693  cursor_tuple_fraction     | 0.1
3694  default_statistics_target | 100
3695  from_collapse_limit       | 8
3696  join_collapse_limit       | 8
3697  cpu_index_tuple_cost      | 0.005
3698  cpu_operator_cost         | 0.0025
3699  cpu_tuple_cost            | 0.01
3700  effective_cache_size      | 16384
3701  random_page_cost          | 4
3702  seq_page_cost             | 1
3703  enable_bitmapscan         | on
3704  enable_hashagg            | on
3705  enable_hashjoin           | on
3706  enable_indexscan          | off
3707  enable_material           | on
3708  enable_mergejoin          | off
3709  enable_nestloop           | on
3710  enable_seqscan            | on
3711  enable_sort               | on
3712  enable_tidscan            | on
3713  client_min_messages       | log
3714 (29 rows)
3715
3716 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3717           QUERY PLAN          
3718 ------------------------------
3719  Hash Join
3720    Hash Cond: (t1.c1 = t2.c1)
3721    ->  Seq Scan on t1
3722    ->  Hash
3723          ->  Seq Scan on t2
3724 (5 rows)
3725
3726 COMMIT;
3727 -- No. A-12-3-3
3728 SET enable_indexscan TO off;
3729 SET enable_mergejoin TO off;
3730 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3731           QUERY PLAN          
3732 ------------------------------
3733  Hash Join
3734    Hash Cond: (t1.c1 = t2.c1)
3735    ->  Seq Scan on t1
3736    ->  Hash
3737          ->  Seq Scan on t2
3738 (5 rows)
3739
3740 SELECT name, setting FROM settings;
3741            name            |  setting  
3742 ---------------------------+-----------
3743  geqo                      | on
3744  geqo_effort               | 5
3745  geqo_generations          | 0
3746  geqo_pool_size            | 0
3747  geqo_seed                 | 0
3748  geqo_selection_bias       | 2
3749  geqo_threshold            | 12
3750  constraint_exclusion      | partition
3751  cursor_tuple_fraction     | 0.1
3752  default_statistics_target | 100
3753  from_collapse_limit       | 8
3754  join_collapse_limit       | 8
3755  cpu_index_tuple_cost      | 0.005
3756  cpu_operator_cost         | 0.0025
3757  cpu_tuple_cost            | 0.01
3758  effective_cache_size      | 16384
3759  random_page_cost          | 4
3760  seq_page_cost             | 1
3761  enable_bitmapscan         | on
3762  enable_hashagg            | on
3763  enable_hashjoin           | on
3764  enable_indexscan          | off
3765  enable_material           | on
3766  enable_mergejoin          | off
3767  enable_nestloop           | on
3768  enable_seqscan            | on
3769  enable_sort               | on
3770  enable_tidscan            | on
3771  client_min_messages       | log
3772 (29 rows)
3773
3774 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3775 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3776 LOG:  pg_hint_plan:
3777 used hint:
3778 IndexScan(t2)
3779 MergeJoin(t1 t2)
3780 Leading(t2 t1)
3781 Set(enable_indexscan on)
3782 Set(geqo_threshold 100)
3783 not used hint:
3784 duplication hint:
3785 error hint:
3786
3787              QUERY PLAN             
3788 ------------------------------------
3789  Merge Join
3790    Merge Cond: (t1.c1 = t2.c1)
3791    ->  Index Scan using t1_i1 on t1
3792    ->  Index Scan using t2_i1 on t2
3793 (4 rows)
3794
3795 \connect
3796 SET enable_indexscan TO off;
3797 SET enable_mergejoin TO off;
3798 LOAD 'pg_hint_plan';
3799 SELECT name, setting FROM settings;
3800            name            |  setting  
3801 ---------------------------+-----------
3802  geqo                      | on
3803  geqo_effort               | 5
3804  geqo_generations          | 0
3805  geqo_pool_size            | 0
3806  geqo_seed                 | 0
3807  geqo_selection_bias       | 2
3808  geqo_threshold            | 12
3809  constraint_exclusion      | partition
3810  cursor_tuple_fraction     | 0.1
3811  default_statistics_target | 100
3812  from_collapse_limit       | 8
3813  join_collapse_limit       | 8
3814  cpu_index_tuple_cost      | 0.005
3815  cpu_operator_cost         | 0.0025
3816  cpu_tuple_cost            | 0.01
3817  effective_cache_size      | 16384
3818  random_page_cost          | 4
3819  seq_page_cost             | 1
3820  enable_bitmapscan         | on
3821  enable_hashagg            | on
3822  enable_hashjoin           | on
3823  enable_indexscan          | off
3824  enable_material           | on
3825  enable_mergejoin          | off
3826  enable_nestloop           | on
3827  enable_seqscan            | on
3828  enable_sort               | on
3829  enable_tidscan            | on
3830  client_min_messages       | notice
3831 (29 rows)
3832
3833 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3834           QUERY PLAN          
3835 ------------------------------
3836  Hash Join
3837    Hash Cond: (t1.c1 = t2.c1)
3838    ->  Seq Scan on t1
3839    ->  Hash
3840          ->  Seq Scan on t2
3841 (5 rows)
3842
3843 SET pg_hint_plan.enable_hint TO on;
3844 SET pg_hint_plan.debug_print TO on;
3845 SET client_min_messages TO LOG;
3846 SET search_path TO public;
3847 RESET enable_indexscan;
3848 RESET enable_mergejoin;
3849 ----
3850 ---- No. A-13 call planner recursively
3851 ----
3852 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
3853 DECLARE
3854     new_cnt int;
3855 BEGIN
3856     RAISE NOTICE 'nested_planner(%)', cnt;
3857
3858     /* 再帰終了の判断 */
3859     IF cnt <= 1 THEN
3860         RETURN 0;
3861     END IF;
3862
3863     EXECUTE '/*+ IndexScan(t_1) */'
3864             ' SELECT nested_planner($1) FROM s1.t1 t_1'
3865             ' JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)'
3866             ' ORDER BY t_1.c1 LIMIT 1'
3867         INTO new_cnt USING cnt - 1;
3868
3869     RETURN new_cnt;
3870 END;
3871 $$ LANGUAGE plpgsql IMMUTABLE;
3872 ----
3873 ---- No. A-13-2 use hint of main query
3874 ----
3875 --No.13-2-1
3876 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3877 NOTICE:  nested_planner(1)
3878             QUERY PLAN            
3879 ----------------------------------
3880  Index Scan using t1_i1 on t1 t_1
3881 (1 row)
3882
3883 /*+SeqScan(t_1)*/
3884 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3885 NOTICE:  nested_planner(1)
3886 LOG:  pg_hint_plan:
3887 used hint:
3888 SeqScan(t_1)
3889 not used hint:
3890 duplication hint:
3891 error hint:
3892
3893         QUERY PLAN        
3894 --------------------------
3895  Sort
3896    Sort Key: c1
3897    ->  Seq Scan on t1 t_1
3898 (3 rows)
3899
3900 ----
3901 ---- No. A-13-3 output number of times of debugging log
3902 ----
3903 --No.13-3-1
3904 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3905 NOTICE:  nested_planner(1)
3906             QUERY PLAN            
3907 ----------------------------------
3908  Index Scan using t1_i1 on t1 t_1
3909 (1 row)
3910
3911 /*+SeqScan(t_2)*/
3912 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3913 NOTICE:  nested_planner(1)
3914 LOG:  pg_hint_plan:
3915 used hint:
3916 not used hint:
3917 SeqScan(t_2)
3918 duplication hint:
3919 error hint:
3920
3921             QUERY PLAN            
3922 ----------------------------------
3923  Index Scan using t1_i1 on t1 t_1
3924 (1 row)
3925
3926 --No.13-3-2
3927 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
3928 NOTICE:  nested_planner(2)
3929 NOTICE:  nested_planner(1)
3930 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3931 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3932             QUERY PLAN            
3933 ----------------------------------
3934  Index Scan using t1_i1 on t1 t_1
3935 (1 row)
3936
3937 /*+SeqScan(t_2)*/
3938 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
3939 NOTICE:  nested_planner(2)
3940 NOTICE:  nested_planner(1)
3941 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3942 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3943 LOG:  pg_hint_plan:
3944 used hint:
3945 SeqScan(t_2)
3946 not used hint:
3947 duplication hint:
3948 error hint:
3949
3950 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3951 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3952 LOG:  pg_hint_plan:
3953 used hint:
3954 not used hint:
3955 SeqScan(t_2)
3956 duplication hint:
3957 error hint:
3958
3959             QUERY PLAN            
3960 ----------------------------------
3961  Index Scan using t1_i1 on t1 t_1
3962 (1 row)
3963
3964 --No.13-3-3
3965 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
3966 NOTICE:  nested_planner(5)
3967 NOTICE:  nested_planner(4)
3968 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3969 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3970 NOTICE:  nested_planner(3)
3971 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3972 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3973 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3974 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3975 NOTICE:  nested_planner(2)
3976 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3977 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3978 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3979 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3980 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3981 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3982 NOTICE:  nested_planner(1)
3983 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3984 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3985 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3986 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3987 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3988 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3989 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
3990 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3991             QUERY PLAN            
3992 ----------------------------------
3993  Index Scan using t1_i1 on t1 t_1
3994 (1 row)
3995
3996 /*+SeqScan(t_2)*/
3997 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
3998 NOTICE:  nested_planner(5)
3999 NOTICE:  nested_planner(4)
4000 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4001 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4002 NOTICE:  nested_planner(3)
4003 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4004 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4005 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4006 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4007 NOTICE:  nested_planner(2)
4008 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4009 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4010 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4011 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4012 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4013 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4014 NOTICE:  nested_planner(1)
4015 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4016 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4017 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4018 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4019 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4020 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4021 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4022 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4023 LOG:  pg_hint_plan:
4024 used hint:
4025 SeqScan(t_2)
4026 not used hint:
4027 duplication hint:
4028 error hint:
4029
4030 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4031 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4032 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4033 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4034 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4035 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4036 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4037 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4038 LOG:  pg_hint_plan:
4039 used hint:
4040 SeqScan(t_2)
4041 not used hint:
4042 duplication hint:
4043 error hint:
4044
4045 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4046 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4047 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4048 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4049 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4050 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4051 LOG:  pg_hint_plan:
4052 used hint:
4053 SeqScan(t_2)
4054 not used hint:
4055 duplication hint:
4056 error hint:
4057
4058 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4059 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4060 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4061 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4062 LOG:  pg_hint_plan:
4063 used hint:
4064 SeqScan(t_2)
4065 not used hint:
4066 duplication hint:
4067 error hint:
4068
4069 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4070 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4071 LOG:  pg_hint_plan:
4072 used hint:
4073 not used hint:
4074 SeqScan(t_2)
4075 duplication hint:
4076 error hint:
4077
4078             QUERY PLAN            
4079 ----------------------------------
4080  Index Scan using t1_i1 on t1 t_1
4081 (1 row)
4082
4083 ----
4084 ---- No. A-13-4 output of debugging log on hint status
4085 ----
4086 --No.13-4-1
4087 /*+HashJoin(t_1 t_2)*/
4088 EXPLAIN (COSTS false)
4089  SELECT nested_planner(2) FROM s1.t1 t_1
4090    JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4091   ORDER BY t_1.c1;
4092 NOTICE:  nested_planner(2)
4093 NOTICE:  nested_planner(1)
4094 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4095 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4096 LOG:  pg_hint_plan:
4097 used hint:
4098 HashJoin(t_1 t_2)
4099 not used hint:
4100 duplication hint:
4101 error hint:
4102
4103 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4104 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4105 LOG:  pg_hint_plan:
4106 used hint:
4107 HashJoin(t_1 t_2)
4108 not used hint:
4109 duplication hint:
4110 error hint:
4111
4112               QUERY PLAN              
4113 --------------------------------------
4114  Sort
4115    Sort Key: t_1.c1
4116    ->  Hash Join
4117          Hash Cond: (t_1.c1 = t_2.c1)
4118          ->  Seq Scan on t1 t_1
4119          ->  Hash
4120                ->  Seq Scan on t2 t_2
4121 (7 rows)
4122
4123 --No.13-4-2
4124 /*+HashJoin(st_1 st_2)*/
4125 EXPLAIN (COSTS false)
4126  SELECT nested_planner(2) FROM s1.t1 st_1
4127    JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4128   ORDER BY st_1.c1;
4129 NOTICE:  nested_planner(2)
4130 NOTICE:  nested_planner(1)
4131 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4132 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4133 LOG:  pg_hint_plan:
4134 used hint:
4135 not used hint:
4136 HashJoin(st_1 st_2)
4137 duplication hint:
4138 error hint:
4139
4140 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4141 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4142 LOG:  pg_hint_plan:
4143 used hint:
4144 HashJoin(st_1 st_2)
4145 not used hint:
4146 duplication hint:
4147 error hint:
4148
4149                QUERY PLAN               
4150 ----------------------------------------
4151  Sort
4152    Sort Key: st_1.c1
4153    ->  Hash Join
4154          Hash Cond: (st_1.c1 = st_2.c1)
4155          ->  Seq Scan on t1 st_1
4156          ->  Hash
4157                ->  Seq Scan on t2 st_2
4158 (7 rows)
4159
4160 --No.13-4-3
4161 /*+HashJoin(t_1 t_2)*/
4162 EXPLAIN (COSTS false)
4163  SELECT nested_planner(2) FROM s1.t1 st_1
4164    JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4165   ORDER BY st_1.c1;
4166 NOTICE:  nested_planner(2)
4167 NOTICE:  nested_planner(1)
4168 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4169 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4170 LOG:  pg_hint_plan:
4171 used hint:
4172 HashJoin(t_1 t_2)
4173 not used hint:
4174 duplication hint:
4175 error hint:
4176
4177 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4178 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4179 LOG:  pg_hint_plan:
4180 used hint:
4181 not used hint:
4182 HashJoin(t_1 t_2)
4183 duplication hint:
4184 error hint:
4185
4186                QUERY PLAN                
4187 -----------------------------------------
4188  Merge Join
4189    Merge Cond: (st_1.c1 = st_2.c1)
4190    ->  Index Scan using t1_i1 on t1 st_1
4191    ->  Sort
4192          Sort Key: st_2.c1
4193          ->  Seq Scan on t2 st_2
4194 (6 rows)
4195
4196 --No.13-4-4
4197 /*+HashJoin(st_1 st_2)*/
4198 EXPLAIN (COSTS false)
4199  SELECT nested_planner(2) FROM s1.t1 t_1
4200    JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4201   ORDER BY t_1.c1;
4202 NOTICE:  nested_planner(2)
4203 NOTICE:  nested_planner(1)
4204 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4205 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4206 LOG:  pg_hint_plan:
4207 used hint:
4208 not used hint:
4209 HashJoin(st_1 st_2)
4210 duplication hint:
4211 error hint:
4212
4213 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4214 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4215 LOG:  pg_hint_plan:
4216 used hint:
4217 not used hint:
4218 HashJoin(st_1 st_2)
4219 duplication hint:
4220 error hint:
4221
4222                QUERY PLAN               
4223 ----------------------------------------
4224  Merge Join
4225    Merge Cond: (t_1.c1 = t_2.c1)
4226    ->  Index Scan using t1_i1 on t1 t_1
4227    ->  Sort
4228          Sort Key: t_2.c1
4229          ->  Seq Scan on t2 t_2
4230 (6 rows)
4231
4232 --No.13-4-5
4233 /*+HashJoin(t_1 t_1)*/
4234 EXPLAIN (COSTS false)
4235  SELECT nested_planner(2) FROM s1.t1 t_1
4236   ORDER BY t_1.c1;
4237 NOTICE:  nested_planner(2)
4238 NOTICE:  nested_planner(1)
4239 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4240 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4241 INFO:  hint syntax error at or near "HashJoin(t_1 t_1)"
4242 DETAIL:  Relation name "t_1" is duplicated.
4243 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4244 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4245 LOG:  pg_hint_plan:
4246 used hint:
4247 not used hint:
4248 duplication hint:
4249 error hint:
4250 HashJoin(t_1 t_1)
4251
4252 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4253 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4254 LOG:  pg_hint_plan:
4255 used hint:
4256 not used hint:
4257 HashJoin(t_1 t_1)
4258 duplication hint:
4259 error hint:
4260
4261             QUERY PLAN            
4262 ----------------------------------
4263  Index Scan using t1_i1 on t1 t_1
4264 (1 row)
4265
4266 --No.13-4-6
4267 CREATE OR REPLACE FUNCTION nested_planner_one_t(cnt int) RETURNS int AS $$
4268 DECLARE
4269     new_cnt int;
4270 BEGIN
4271     RAISE NOTICE 'nested_planner_one_t(%)', cnt;
4272
4273     IF cnt <= 1 THEN
4274         RETURN 0;
4275     END IF;
4276
4277     EXECUTE '/*+ IndexScan(t_1) */'
4278             ' SELECT nested_planner_one_t($1) FROM s1.t1 t_1'
4279             ' ORDER BY t_1.c1 LIMIT 1'
4280         INTO new_cnt USING cnt - 1;
4281
4282     RETURN new_cnt;
4283 END;
4284 $$ LANGUAGE plpgsql IMMUTABLE;
4285 EXPLAIN (COSTS false)
4286  SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4287    JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4288   ORDER BY t_1.c1;
4289 NOTICE:  nested_planner_one_t(2)
4290 NOTICE:  nested_planner_one_t(1)
4291 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4292 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4293                QUERY PLAN               
4294 ----------------------------------------
4295  Merge Join
4296    Merge Cond: (t_1.c1 = t_2.c1)
4297    ->  Index Scan using t1_i1 on t1 t_1
4298    ->  Sort
4299          Sort Key: t_2.c1
4300          ->  Seq Scan on t2 t_2
4301 (6 rows)
4302
4303 /*+HashJoin(t_1 t_1)*/
4304 EXPLAIN (COSTS false)
4305  SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4306    JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4307   ORDER BY t_1.c1;
4308 NOTICE:  nested_planner_one_t(2)
4309 NOTICE:  nested_planner_one_t(1)
4310 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4311 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4312 LOG:  pg_hint_plan:
4313 used hint:
4314 not used hint:
4315 HashJoin(t_1 t_1)
4316 duplication hint:
4317 error hint:
4318
4319 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4320 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4321 INFO:  hint syntax error at or near "HashJoin(t_1 t_1)"
4322 DETAIL:  Relation name "t_1" is duplicated.
4323 LOG:  pg_hint_plan:
4324 used hint:
4325 not used hint:
4326 duplication hint:
4327 error hint:
4328 HashJoin(t_1 t_1)
4329
4330                QUERY PLAN               
4331 ----------------------------------------
4332  Merge Join
4333    Merge Cond: (t_1.c1 = t_2.c1)
4334    ->  Index Scan using t1_i1 on t1 t_1
4335    ->  Sort
4336          Sort Key: t_2.c1
4337          ->  Seq Scan on t2 t_2
4338 (6 rows)
4339
4340 DROP FUNCTION nested_planner_one_t(int);
4341 --No.13-4-7
4342 /*+HashJoin(t_1 t_1)*/
4343 EXPLAIN (COSTS false)
4344  SELECT nested_planner(2) FROM s1.t1 t_1
4345    JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4346   ORDER BY t_1.c1;
4347 NOTICE:  nested_planner(2)
4348 NOTICE:  nested_planner(1)
4349 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4350 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4351 INFO:  hint syntax error at or near "HashJoin(t_1 t_1)"
4352 DETAIL:  Relation name "t_1" is duplicated.
4353 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4354 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4355 LOG:  pg_hint_plan:
4356 used hint:
4357 not used hint:
4358 duplication hint:
4359 error hint:
4360 HashJoin(t_1 t_1)
4361
4362 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4363 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4364 INFO:  hint syntax error at or near "HashJoin(t_1 t_1)"
4365 DETAIL:  Relation name "t_1" is duplicated.
4366 LOG:  pg_hint_plan:
4367 used hint:
4368 not used hint:
4369 duplication hint:
4370 error hint:
4371 HashJoin(t_1 t_1)
4372
4373                QUERY PLAN               
4374 ----------------------------------------
4375  Merge Join
4376    Merge Cond: (t_1.c1 = t_2.c1)
4377    ->  Index Scan using t1_i1 on t1 t_1
4378    ->  Sort
4379          Sort Key: t_2.c1
4380          ->  Seq Scan on t2 t_2
4381 (6 rows)
4382
4383 --No.13-4-8
4384 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
4385 EXPLAIN (COSTS false)
4386  SELECT nested_planner(2) FROM s1.t1 t_1
4387    JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4388   ORDER BY t_1.c1;
4389 INFO:  hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4390 DETAIL:  Conflict join method hint.
4391 NOTICE:  nested_planner(2)
4392 INFO:  hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4393 DETAIL:  Conflict join method hint.
4394 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4395 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4396 NOTICE:  nested_planner(1)
4397 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4398 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4399 LOG:  pg_hint_plan:
4400 used hint:
4401 HashJoin(t_1 t_2)
4402 not used hint:
4403 duplication hint:
4404 MergeJoin(t_1 t_2)
4405 error hint:
4406
4407 CONTEXT:  SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4408 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4409 LOG:  pg_hint_plan:
4410 used hint:
4411 HashJoin(t_1 t_2)
4412 not used hint:
4413 duplication hint:
4414 MergeJoin(t_1 t_2)
4415 error hint:
4416
4417               QUERY PLAN              
4418 --------------------------------------
4419  Sort
4420    Sort Key: t_1.c1
4421    ->  Hash Join
4422          Hash Cond: (t_1.c1 = t_2.c1)
4423          ->  Seq Scan on t1 t_1
4424          ->  Hash
4425                ->  Seq Scan on t2 t_2
4426 (7 rows)
4427