OSDN Git Service

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