OSDN Git Service

8月9日午前中消化分の試験を追加した。
[pghintplan/pg_hint_plan.git] / expected / ut-A.out
1 LOAD 'pg_hint_plan';
2 SET pg_hint_plan.enable 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 ---- TODO 後で適切な位置に移動する
7 ----
8 ---- No. J-3-4 hint state output
9 ----
10 -- No. J-3-4-7
11 /*+Set(enable_indexscan off)NestLoop("")Set(enable_bitmapscan off)*/
12 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
13 INFO:  hint syntax error at or near ")Set(enable_bitmapscan off)"
14 DETAIL:  Relation name is necessary.
15 LOG:  pg_hint_plan:
16 used hint:
17 Set(enable_indexscan off)
18 not used hint:
19 duplication hint:
20 error hint:
21
22              QUERY PLAN             
23 ------------------------------------
24  Bitmap Heap Scan on t1
25    Recheck Cond: (c1 = 1)
26    ->  Bitmap Index Scan on t1_pkey
27          Index Cond: (c1 = 1)
28 (4 rows)
29
30 ----
31 ---- No. A-5-1 hint format
32 ----
33 -- No. A-5-1-1
34 /*+SeqScan(t1)*/
35 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
36 LOG:  pg_hint_plan:
37 used hint:
38 SeqScan(t1)
39 not used hint:
40 duplication hint:
41 error hint:
42
43      QUERY PLAN     
44 --------------------
45  Seq Scan on t1
46    Filter: (c1 = 1)
47 (2 rows)
48
49 -- No. A-5-1-2
50 /* +SeqScan(t1)*/
51 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
52            QUERY PLAN           
53 --------------------------------
54  Index Scan using t1_pkey on t1
55    Index Cond: (c1 = 1)
56 (2 rows)
57
58 -- No. A-5-1-3
59 --+SeqScan(t1)
60 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
61            QUERY PLAN           
62 --------------------------------
63  Index Scan using t1_pkey on t1
64    Index Cond: (c1 = 1)
65 (2 rows)
66
67 -- No. A-5-1-4
68 --+SeqScan(t1)
69 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
70            QUERY PLAN           
71 --------------------------------
72  Index Scan using t1_pkey on t1
73    Index Cond: (c1 = 1)
74 (2 rows)
75
76 -- No. A-5-1-5
77 -- +SeqScan(t1)
78 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
79            QUERY PLAN           
80 --------------------------------
81  Index Scan using t1_pkey on t1
82    Index Cond: (c1 = 1)
83 (2 rows)
84
85 -- No. A-5-1-6
86 --SeqScan(t1)
87 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
88            QUERY PLAN           
89 --------------------------------
90  Index Scan using t1_pkey on t1
91    Index Cond: (c1 = 1)
92 (2 rows)
93
94 -- No. A-5-1-7
95 /*+SeqScan(t1) /* nest comment */ */
96 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
97 INFO:  hint syntax error at or near "/* nest comment */ */
98 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
99 DETAIL:  Block comments nest doesn't supported.
100            QUERY PLAN           
101 --------------------------------
102  Index Scan using t1_pkey on t1
103    Index Cond: (c1 = 1)
104 (2 rows)
105
106 -- No. A-5-1-8
107 /* +SeqScan(t1) /* nest comment */ */
108 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
109            QUERY PLAN           
110 --------------------------------
111  Index Scan using t1_pkey on t1
112    Index Cond: (c1 = 1)
113 (2 rows)
114
115 -- No. A-5-1-9
116 /*SeqScan(t1) /* nest comment */ */
117 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
118            QUERY PLAN           
119 --------------------------------
120  Index Scan using t1_pkey on t1
121    Index Cond: (c1 = 1)
122 (2 rows)
123
124 ----
125 ---- No. A-5-2 hint position
126 ----
127 -- No. A-5-2-1
128 /*+SeqScan(t1)*/
129 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
130 LOG:  pg_hint_plan:
131 used hint:
132 SeqScan(t1)
133 not used hint:
134 duplication hint:
135 error hint:
136
137      QUERY PLAN     
138 --------------------
139  Seq Scan on t1
140    Filter: (c1 = 1)
141 (2 rows)
142
143 -- No. A-5-2-2
144 /* normal comment */
145 /*+SeqScan(t1)*/
146 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
147            QUERY PLAN           
148 --------------------------------
149  Index Scan using t1_pkey on t1
150    Index Cond: (c1 = 1)
151 (2 rows)
152
153 -- No. A-5-2-3
154 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
155            QUERY PLAN           
156 --------------------------------
157  Index Scan using t1_pkey on t1
158    Index Cond: (c1 = 1)
159 (2 rows)
160
161 ----
162 ---- No. A-5-4 hint delimiter
163 ----
164 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
165            QUERY PLAN           
166 --------------------------------
167  Index Scan using t1_pkey on t1
168    Index Cond: (c1 = 1)
169 (2 rows)
170
171 -- No. A-5-4-1
172 -- No. A-5-4-2
173 -- No. A-5-4-3
174 -- No. A-5-4-4
175 -- No. A-5-4-5
176 -- No. A-5-4-6
177 -- No. A-5-4-7
178 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
179 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
180 LOG:  pg_hint_plan:
181 used hint:
182 Set(enable_bitmapscan off)
183 Set(enable_indexscan off)
184 not used hint:
185 duplication hint:
186 error hint:
187
188      QUERY PLAN     
189 --------------------
190  Seq Scan on t1
191    Filter: (c1 = 1)
192 (2 rows)
193
194 -- No. A-5-4-8
195 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
196 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
197 LOG:  pg_hint_plan:
198 used hint:
199 Set(enable_bitmapscan off)
200 Set(enable_indexscan off)
201 not used hint:
202 duplication hint:
203 error hint:
204
205      QUERY PLAN     
206 --------------------
207  Seq Scan on t1
208    Filter: (c1 = 1)
209 (2 rows)
210
211 -- No. A-5-4-9
212 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
213 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
214 LOG:  pg_hint_plan:
215 used hint:
216 Set(enable_bitmapscan off)
217 Set(enable_indexscan off)
218 not used hint:
219 duplication hint:
220 error hint:
221
222      QUERY PLAN     
223 --------------------
224  Seq Scan on t1
225    Filter: (c1 = 1)
226 (2 rows)
227
228 -- No. A-5-4-10
229 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
230 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
231 LOG:  pg_hint_plan:
232 used hint:
233 Set(enable_bitmapscan off)
234 Set(enable_indexscan off)
235 not used hint:
236 duplication hint:
237 error hint:
238
239      QUERY PLAN     
240 --------------------
241  Seq Scan on t1
242    Filter: (c1 = 1)
243 (2 rows)
244
245 -- No. A-5-4-11
246 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
247 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
248 LOG:  pg_hint_plan:
249 used hint:
250 Set(enable_bitmapscan off)
251 Set(enable_indexscan off)
252 not used hint:
253 duplication hint:
254 error hint:
255
256      QUERY PLAN     
257 --------------------
258  Seq Scan on t1
259    Filter: (c1 = 1)
260 (2 rows)
261
262 -- No. A-5-4-12
263 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
264 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
265 LOG:  pg_hint_plan:
266 used hint:
267 Set(enable_bitmapscan off)
268 Set(enable_indexscan off)
269 not used hint:
270 duplication hint:
271 error hint:
272
273      QUERY PLAN     
274 --------------------
275  Seq Scan on t1
276    Filter: (c1 = 1)
277 (2 rows)
278
279 -- No. A-5-4-13
280 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
281 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
282 LOG:  pg_hint_plan:
283 used hint:
284 Set(enable_bitmapscan off)
285 Set(enable_indexscan off)
286 not used hint:
287 duplication hint:
288 error hint:
289
290      QUERY PLAN     
291 --------------------
292  Seq Scan on t1
293    Filter: (c1 = 1)
294 (2 rows)
295
296 -- No. A-5-4-14
297 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
298 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
299 LOG:  pg_hint_plan:
300 used hint:
301 Set(enable_bitmapscan off)
302 Set(enable_indexscan off)
303 not used hint:
304 duplication hint:
305 error hint:
306
307      QUERY PLAN     
308 --------------------
309  Seq Scan on t1
310    Filter: (c1 = 1)
311 (2 rows)
312
313 -- No. A-5-4-15
314 /*+     Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
315 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
316 LOG:  pg_hint_plan:
317 used hint:
318 Set(enable_bitmapscan off)
319 Set(enable_indexscan off)
320 not used hint:
321 duplication hint:
322 error hint:
323
324      QUERY PLAN     
325 --------------------
326  Seq Scan on t1
327    Filter: (c1 = 1)
328 (2 rows)
329
330 -- No. A-5-4-16
331 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")        */
332 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
333 LOG:  pg_hint_plan:
334 used hint:
335 Set(enable_bitmapscan off)
336 Set(enable_indexscan off)
337 not used hint:
338 duplication hint:
339 error hint:
340
341      QUERY PLAN     
342 --------------------
343  Seq Scan on t1
344    Filter: (c1 = 1)
345 (2 rows)
346
347 -- No. A-5-4-17
348 /*+     Set     (enable_indexscan"off") Set     (enable_bitmapscan"off")*/
349 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
350 LOG:  pg_hint_plan:
351 used hint:
352 Set(enable_bitmapscan off)
353 Set(enable_indexscan off)
354 not used hint:
355 duplication hint:
356 error hint:
357
358      QUERY PLAN     
359 --------------------
360  Seq Scan on t1
361    Filter: (c1 = 1)
362 (2 rows)
363
364 -- No. A-5-4-18
365 /*+Set  (       enable_indexscan"off")Set       (       enable_bitmapscan"off")*/
366 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
367 LOG:  pg_hint_plan:
368 used hint:
369 Set(enable_bitmapscan off)
370 Set(enable_indexscan off)
371 not used hint:
372 duplication hint:
373 error hint:
374
375      QUERY PLAN     
376 --------------------
377  Seq Scan on t1
378    Filter: (c1 = 1)
379 (2 rows)
380
381 -- No. A-5-4-19
382 /*+Set(enable_indexscan"off"    )       Set(enable_bitmapscan"off"      )       */
383 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
384 LOG:  pg_hint_plan:
385 used hint:
386 Set(enable_bitmapscan off)
387 Set(enable_indexscan off)
388 not used hint:
389 duplication hint:
390 error hint:
391
392      QUERY PLAN     
393 --------------------
394  Seq Scan on t1
395    Filter: (c1 = 1)
396 (2 rows)
397
398 -- No. A-5-4-20
399 /*+Set( enable_indexscan        "off"   )Set(   enable_bitmapscan       "off"   )*/
400 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
401 LOG:  pg_hint_plan:
402 used hint:
403 Set(enable_bitmapscan off)
404 Set(enable_indexscan off)
405 not used hint:
406 duplication hint:
407 error hint:
408
409      QUERY PLAN     
410 --------------------
411  Seq Scan on t1
412    Filter: (c1 = 1)
413 (2 rows)
414
415 -- No. A-5-4-21
416 /*+     Set     (       enable_indexscan        "off"   )       Set     (       enable_bitmapscan       "off"   )       */
417 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
418 LOG:  pg_hint_plan:
419 used hint:
420 Set(enable_bitmapscan off)
421 Set(enable_indexscan off)
422 not used hint:
423 duplication hint:
424 error hint:
425
426      QUERY PLAN     
427 --------------------
428  Seq Scan on t1
429    Filter: (c1 = 1)
430 (2 rows)
431
432 -- No. A-5-4-22
433 /*+
434 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
435 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
436 LOG:  pg_hint_plan:
437 used hint:
438 Set(enable_bitmapscan off)
439 Set(enable_indexscan off)
440 not used hint:
441 duplication hint:
442 error hint:
443
444      QUERY PLAN     
445 --------------------
446  Seq Scan on t1
447    Filter: (c1 = 1)
448 (2 rows)
449
450 -- No. A-5-4-23
451 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
452 */
453 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
454 LOG:  pg_hint_plan:
455 used hint:
456 Set(enable_bitmapscan off)
457 Set(enable_indexscan off)
458 not used hint:
459 duplication hint:
460 error hint:
461
462      QUERY PLAN     
463 --------------------
464  Seq Scan on t1
465    Filter: (c1 = 1)
466 (2 rows)
467
468 -- No. A-5-4-24
469 /*+
470 Set
471 (enable_indexscan"off")
472 Set
473 (enable_bitmapscan"off")*/
474 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
475 LOG:  pg_hint_plan:
476 used hint:
477 Set(enable_bitmapscan off)
478 Set(enable_indexscan off)
479 not used hint:
480 duplication hint:
481 error hint:
482
483      QUERY PLAN     
484 --------------------
485  Seq Scan on t1
486    Filter: (c1 = 1)
487 (2 rows)
488
489 -- No. A-5-4-25
490 /*+Set
491 (
492 enable_indexscan"off")Set
493 (
494 enable_bitmapscan"off")*/
495 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
496 LOG:  pg_hint_plan:
497 used hint:
498 Set(enable_bitmapscan off)
499 Set(enable_indexscan off)
500 not used hint:
501 duplication hint:
502 error hint:
503
504      QUERY PLAN     
505 --------------------
506  Seq Scan on t1
507    Filter: (c1 = 1)
508 (2 rows)
509
510 -- No. A-5-4-26
511 /*+Set(enable_indexscan"off"
512 )
513 Set(enable_bitmapscan"off"
514 )
515 */
516 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
517 LOG:  pg_hint_plan:
518 used hint:
519 Set(enable_bitmapscan off)
520 Set(enable_indexscan off)
521 not used hint:
522 duplication hint:
523 error hint:
524
525      QUERY PLAN     
526 --------------------
527  Seq Scan on t1
528    Filter: (c1 = 1)
529 (2 rows)
530
531 -- No. A-5-4-27
532 /*+Set(
533 enable_indexscan
534 "off"
535 )Set(
536 enable_bitmapscan
537 "off"
538 )*/
539 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
540 LOG:  pg_hint_plan:
541 used hint:
542 Set(enable_bitmapscan off)
543 Set(enable_indexscan off)
544 not used hint:
545 duplication hint:
546 error hint:
547
548      QUERY PLAN     
549 --------------------
550  Seq Scan on t1
551    Filter: (c1 = 1)
552 (2 rows)
553
554 -- No. A-5-4-28
555 /*+
556 Set
557 (
558 enable_indexscan
559 "off"
560 )
561 Set
562 (
563 enable_bitmapscan
564 "off"
565 )
566 */
567 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
568 LOG:  pg_hint_plan:
569 used hint:
570 Set(enable_bitmapscan off)
571 Set(enable_indexscan off)
572 not used hint:
573 duplication hint:
574 error hint:
575
576      QUERY PLAN     
577 --------------------
578  Seq Scan on t1
579    Filter: (c1 = 1)
580 (2 rows)
581
582 -- No. A-5-4-29
583 /*+     
584          Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
585 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
586 LOG:  pg_hint_plan:
587 used hint:
588 Set(enable_bitmapscan off)
589 Set(enable_indexscan off)
590 not used hint:
591 duplication hint:
592 error hint:
593
594      QUERY PLAN     
595 --------------------
596  Seq Scan on t1
597    Filter: (c1 = 1)
598 (2 rows)
599
600 -- No. A-5-4-30
601 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")        
602          */
603 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
604 LOG:  pg_hint_plan:
605 used hint:
606 Set(enable_bitmapscan off)
607 Set(enable_indexscan off)
608 not used hint:
609 duplication hint:
610 error hint:
611
612      QUERY PLAN     
613 --------------------
614  Seq Scan on t1
615    Filter: (c1 = 1)
616 (2 rows)
617
618 -- No. A-5-4-31
619 /*+     
620          Set    
621          (enable_indexscan"off")        
622          Set    
623          (enable_bitmapscan"off")*/
624 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
625 LOG:  pg_hint_plan:
626 used hint:
627 Set(enable_bitmapscan off)
628 Set(enable_indexscan off)
629 not used hint:
630 duplication hint:
631 error hint:
632
633      QUERY PLAN     
634 --------------------
635  Seq Scan on t1
636    Filter: (c1 = 1)
637 (2 rows)
638
639 -- No. A-5-4-32
640 /*+Set  
641          (      
642          enable_indexscan"off")Set      
643          (      
644          enable_bitmapscan"off")*/
645 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
646 LOG:  pg_hint_plan:
647 used hint:
648 Set(enable_bitmapscan off)
649 Set(enable_indexscan off)
650 not used hint:
651 duplication hint:
652 error hint:
653
654      QUERY PLAN     
655 --------------------
656  Seq Scan on t1
657    Filter: (c1 = 1)
658 (2 rows)
659
660 -- No. A-5-4-33
661 /*+Set(enable_indexscan"off"    
662          )      
663          Set(enable_bitmapscan"off"     
664          )      
665          */
666 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
667 LOG:  pg_hint_plan:
668 used hint:
669 Set(enable_bitmapscan off)
670 Set(enable_indexscan off)
671 not used hint:
672 duplication hint:
673 error hint:
674
675      QUERY PLAN     
676 --------------------
677  Seq Scan on t1
678    Filter: (c1 = 1)
679 (2 rows)
680
681 -- No. A-5-4-34
682 /*+Set(         
683          enable_indexscan       
684          "off"  
685          )Set(  
686          enable_bitmapscan      
687          "off"  
688          )*/
689 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
690 LOG:  pg_hint_plan:
691 used hint:
692 Set(enable_bitmapscan off)
693 Set(enable_indexscan off)
694 not used hint:
695 duplication hint:
696 error hint:
697
698      QUERY PLAN     
699 --------------------
700  Seq Scan on t1
701    Filter: (c1 = 1)
702 (2 rows)
703
704 -- No. A-5-4-35
705 /*+     
706          Set    
707          (      
708          enable_indexscan       
709          "off"  
710          )      
711          Set    
712          (      
713          enable_bitmapscan      
714          "off"  
715          )      
716          */
717 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
718 LOG:  pg_hint_plan:
719 used hint:
720 Set(enable_bitmapscan off)
721 Set(enable_indexscan off)
722 not used hint:
723 duplication hint:
724 error hint:
725
726      QUERY PLAN     
727 --------------------
728  Seq Scan on t1
729    Filter: (c1 = 1)
730 (2 rows)
731
732 ----
733 ---- No. A-5-5 hint object pattern
734 ---- No. A-7-2 message object pattern
735 ----
736 -- No. A-5-5-1
737 -- No. A-7-2-1
738 /*+SeqScan(t)*/
739 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
740 LOG:  pg_hint_plan:
741 used hint:
742 SeqScan(t)
743 not used hint:
744 duplication hint:
745 error hint:
746
747      QUERY PLAN     
748 --------------------
749  Seq Scan on t1 t
750    Filter: (c1 = 1)
751 (2 rows)
752
753 /*+SeqScan(ttt)*/
754 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
755 LOG:  pg_hint_plan:
756 used hint:
757 SeqScan(ttt)
758 not used hint:
759 duplication hint:
760 error hint:
761
762      QUERY PLAN     
763 --------------------
764  Seq Scan on t1 ttt
765    Filter: (c1 = 1)
766 (2 rows)
767
768 /*+SeqScan("t")*/
769 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
770 LOG:  pg_hint_plan:
771 used hint:
772 SeqScan(t)
773 not used hint:
774 duplication hint:
775 error hint:
776
777      QUERY PLAN     
778 --------------------
779  Seq Scan on t1 t
780    Filter: (c1 = 1)
781 (2 rows)
782
783 /*+SeqScan("ttt")*/
784 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
785 LOG:  pg_hint_plan:
786 used hint:
787 SeqScan(ttt)
788 not used hint:
789 duplication hint:
790 error hint:
791
792      QUERY PLAN     
793 --------------------
794  Seq Scan on t1 ttt
795    Filter: (c1 = 1)
796 (2 rows)
797
798 -- No. A-5-5-2
799 -- No. A-7-2-2
800 /*+SeqScan(T)*/
801 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
802 LOG:  pg_hint_plan:
803 used hint:
804 SeqScan(T)
805 not used hint:
806 duplication hint:
807 error hint:
808
809      QUERY PLAN     
810 --------------------
811  Seq Scan on t1 "T"
812    Filter: (c1 = 1)
813 (2 rows)
814
815 /*+SeqScan(TTT)*/
816 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
817 LOG:  pg_hint_plan:
818 used hint:
819 SeqScan(TTT)
820 not used hint:
821 duplication hint:
822 error hint:
823
824       QUERY PLAN      
825 ----------------------
826  Seq Scan on t1 "TTT"
827    Filter: (c1 = 1)
828 (2 rows)
829
830 /*+SeqScan("T")*/
831 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
832 LOG:  pg_hint_plan:
833 used hint:
834 SeqScan(T)
835 not used hint:
836 duplication hint:
837 error hint:
838
839      QUERY PLAN     
840 --------------------
841  Seq Scan on t1 "T"
842    Filter: (c1 = 1)
843 (2 rows)
844
845 /*+SeqScan("TTT")*/
846 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
847 LOG:  pg_hint_plan:
848 used hint:
849 SeqScan(TTT)
850 not used hint:
851 duplication hint:
852 error hint:
853
854       QUERY PLAN      
855 ----------------------
856  Seq Scan on t1 "TTT"
857    Filter: (c1 = 1)
858 (2 rows)
859
860 -- No. A-5-5-3
861 -- No. A-7-2-3
862 /*+SeqScan(()*/
863 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
864 LOG:  pg_hint_plan:
865 used hint:
866 SeqScan(()
867 not used hint:
868 duplication hint:
869 error hint:
870
871      QUERY PLAN     
872 --------------------
873  Seq Scan on t1 "("
874    Filter: (c1 = 1)
875 (2 rows)
876
877 /*+SeqScan(((()*/
878 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
879 LOG:  pg_hint_plan:
880 used hint:
881 SeqScan(((()
882 not used hint:
883 duplication hint:
884 error hint:
885
886       QUERY PLAN      
887 ----------------------
888  Seq Scan on t1 "((("
889    Filter: (c1 = 1)
890 (2 rows)
891
892 /*+SeqScan("(")*/
893 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
894 LOG:  pg_hint_plan:
895 used hint:
896 SeqScan(()
897 not used hint:
898 duplication hint:
899 error hint:
900
901      QUERY PLAN     
902 --------------------
903  Seq Scan on t1 "("
904    Filter: (c1 = 1)
905 (2 rows)
906
907 /*+SeqScan("(((")*/
908 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
909 LOG:  pg_hint_plan:
910 used hint:
911 SeqScan(((()
912 not used hint:
913 duplication hint:
914 error hint:
915
916       QUERY PLAN      
917 ----------------------
918  Seq Scan on t1 "((("
919    Filter: (c1 = 1)
920 (2 rows)
921
922 -- No. A-5-5-4
923 -- No. A-7-2-4
924 /*+SeqScan())*/
925 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
926 INFO:  hint syntax error at or near "))"
927 DETAIL:  Relation name is necessary.
928              QUERY PLAN             
929 ------------------------------------
930  Index Scan using t1_pkey on t1 ")"
931    Index Cond: (c1 = 1)
932 (2 rows)
933
934 /*+SeqScan(")")*/
935 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
936 LOG:  pg_hint_plan:
937 used hint:
938 SeqScan(")")
939 not used hint:
940 duplication hint:
941 error hint:
942
943      QUERY PLAN     
944 --------------------
945  Seq Scan on t1 ")"
946    Filter: (c1 = 1)
947 (2 rows)
948
949 /*+SeqScan(")))")*/
950 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
951 LOG:  pg_hint_plan:
952 used hint:
953 SeqScan(")))")
954 not used hint:
955 duplication hint:
956 error hint:
957
958       QUERY PLAN      
959 ----------------------
960  Seq Scan on t1 ")))"
961    Filter: (c1 = 1)
962 (2 rows)
963
964 -- No. A-5-5-5
965 -- No. A-7-2-5
966 /*+SeqScan(")*/
967 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
968 INFO:  hint syntax error at or near ""
969 DETAIL:  Unterminated quoted relation name.
970              QUERY PLAN              
971 -------------------------------------
972  Index Scan using t1_pkey on t1 """"
973    Index Cond: (c1 = 1)
974 (2 rows)
975
976 /*+SeqScan("""")*/
977 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
978 LOG:  pg_hint_plan:
979 used hint:
980 SeqScan("""")
981 not used hint:
982 duplication hint:
983 error hint:
984
985      QUERY PLAN      
986 ---------------------
987  Seq Scan on t1 """"
988    Filter: (c1 = 1)
989 (2 rows)
990
991 /*+SeqScan("""""""")*/
992 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
993 LOG:  pg_hint_plan:
994 used hint:
995 SeqScan("""""""")
996 not used hint:
997 duplication hint:
998 error hint:
999
1000        QUERY PLAN        
1001 -------------------------
1002  Seq Scan on t1 """"""""
1003    Filter: (c1 = 1)
1004 (2 rows)
1005
1006 -- No. A-5-5-6
1007 -- No. A-7-2-6
1008 /*+SeqScan( )*/
1009 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1010 INFO:  hint syntax error at or near ")"
1011 DETAIL:  Relation name is necessary.
1012              QUERY PLAN             
1013 ------------------------------------
1014  Index Scan using t1_pkey on t1 " "
1015    Index Cond: (c1 = 1)
1016 (2 rows)
1017
1018 /*+SeqScan(" ")*/
1019 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1020 LOG:  pg_hint_plan:
1021 used hint:
1022 SeqScan(" ")
1023 not used hint:
1024 duplication hint:
1025 error hint:
1026
1027      QUERY PLAN     
1028 --------------------
1029  Seq Scan on t1 " "
1030    Filter: (c1 = 1)
1031 (2 rows)
1032
1033 /*+SeqScan("   ")*/
1034 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "   " WHERE "   ".c1 = 1;
1035 LOG:  pg_hint_plan:
1036 used hint:
1037 SeqScan("   ")
1038 not used hint:
1039 duplication hint:
1040 error hint:
1041
1042       QUERY PLAN      
1043 ----------------------
1044  Seq Scan on t1 "   "
1045    Filter: (c1 = 1)
1046 (2 rows)
1047
1048 -- No. A-5-5-7
1049 -- No. A-7-2-7
1050 /*+SeqScan(     )*/
1051 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "     " WHERE "       ".c1 = 1;
1052 INFO:  hint syntax error at or near ")"
1053 DETAIL:  Relation name is necessary.
1054                 QUERY PLAN                 
1055 -------------------------------------------
1056  Index Scan using t1_pkey on t1 "        "
1057    Index Cond: (c1 = 1)
1058 (2 rows)
1059
1060 /*+SeqScan("    ")*/
1061 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "     " WHERE "       ".c1 = 1;
1062 LOG:  pg_hint_plan:
1063 used hint:
1064 SeqScan("       ")
1065 not used hint:
1066 duplication hint:
1067 error hint:
1068
1069         QUERY PLAN         
1070 ---------------------------
1071  Seq Scan on t1 "        "
1072    Filter: (c1 = 1)
1073 (2 rows)
1074
1075 /*+SeqScan("                    ")*/
1076 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "                     " WHERE "                       ".c1 = 1;
1077 LOG:  pg_hint_plan:
1078 used hint:
1079 SeqScan("                       ")
1080 not used hint:
1081 duplication hint:
1082 error hint:
1083
1084                 QUERY PLAN                 
1085 -------------------------------------------
1086  Seq Scan on t1 "                        "
1087    Filter: (c1 = 1)
1088 (2 rows)
1089
1090 -- No. A-5-5-8
1091 -- No. A-7-2-8
1092 /*+SeqScan(
1093 )*/
1094 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1095 " WHERE "
1096 ".c1 = 1;
1097 INFO:  hint syntax error at or near ")"
1098 DETAIL:  Relation name is necessary.
1099             QUERY PLAN            
1100 ----------------------------------
1101  Index Scan using t1_pkey on t1 "
1102  "
1103    Index Cond: (c1 = 1)
1104 (3 rows)
1105
1106 /*+SeqScan("
1107 ")*/
1108 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1109 " WHERE "
1110 ".c1 = 1;
1111 LOG:  pg_hint_plan:
1112 used hint:
1113 SeqScan("
1114 ")
1115 not used hint:
1116 duplication hint:
1117 error hint:
1118
1119      QUERY PLAN     
1120 --------------------
1121  Seq Scan on t1 "
1122  "
1123    Filter: (c1 = 1)
1124 (3 rows)
1125
1126 /*+SeqScan("
1127
1128
1129 ")*/
1130 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1131
1132
1133 " WHERE "
1134
1135
1136 ".c1 = 1;
1137 LOG:  pg_hint_plan:
1138 used hint:
1139 SeqScan("
1140
1141
1142 ")
1143 not used hint:
1144 duplication hint:
1145 error hint:
1146
1147      QUERY PLAN     
1148 --------------------
1149  Seq Scan on t1 "
1150  
1151  
1152  "
1153    Filter: (c1 = 1)
1154 (5 rows)
1155
1156 -- No. A-5-5-9
1157 -- No. A-7-2-9
1158 /*+SeqScan(Set)*/
1159 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1160 LOG:  pg_hint_plan:
1161 used hint:
1162 SeqScan(Set)
1163 not used hint:
1164 duplication hint:
1165 error hint:
1166
1167       QUERY PLAN      
1168 ----------------------
1169  Seq Scan on t1 "Set"
1170    Filter: (c1 = 1)
1171 (2 rows)
1172
1173 /*+SeqScan("Set")*/
1174 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1175 LOG:  pg_hint_plan:
1176 used hint:
1177 SeqScan(Set)
1178 not used hint:
1179 duplication hint:
1180 error hint:
1181
1182       QUERY PLAN      
1183 ----------------------
1184  Seq Scan on t1 "Set"
1185    Filter: (c1 = 1)
1186 (2 rows)
1187
1188 /*+SeqScan("Set SeqScan Leading")*/
1189 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1190 LOG:  pg_hint_plan:
1191 used hint:
1192 SeqScan("Set SeqScan Leading")
1193 not used hint:
1194 duplication hint:
1195 error hint:
1196
1197               QUERY PLAN              
1198 --------------------------------------
1199  Seq Scan on t1 "Set SeqScan Leading"
1200    Filter: (c1 = 1)
1201 (2 rows)
1202
1203 -- No. A-5-5-10
1204 -- No. A-7-2-10
1205 /*+SeqScan(あ)*/
1206 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1207 LOG:  pg_hint_plan:
1208 used hint:
1209 SeqScan(あ)
1210 not used hint:
1211 duplication hint:
1212 error hint:
1213
1214      QUERY PLAN      
1215 ---------------------
1216  Seq Scan on t1 "あ"
1217    Filter: (c1 = 1)
1218 (2 rows)
1219
1220 /*+SeqScan(あいう)*/
1221 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1222 LOG:  pg_hint_plan:
1223 used hint:
1224 SeqScan(あいう)
1225 not used hint:
1226 duplication hint:
1227 error hint:
1228
1229        QUERY PLAN        
1230 -------------------------
1231  Seq Scan on t1 "あいう"
1232    Filter: (c1 = 1)
1233 (2 rows)
1234
1235 /*+SeqScan("あ")*/
1236 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1237 LOG:  pg_hint_plan:
1238 used hint:
1239 SeqScan(あ)
1240 not used hint:
1241 duplication hint:
1242 error hint:
1243
1244      QUERY PLAN      
1245 ---------------------
1246  Seq Scan on t1 "あ"
1247    Filter: (c1 = 1)
1248 (2 rows)
1249
1250 /*+SeqScan("あいう")*/
1251 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1252 LOG:  pg_hint_plan:
1253 used hint:
1254 SeqScan(あいう)
1255 not used hint:
1256 duplication hint:
1257 error hint:
1258
1259        QUERY PLAN        
1260 -------------------------
1261  Seq Scan on t1 "あいう"
1262    Filter: (c1 = 1)
1263 (2 rows)
1264
1265 -- No. A-5-5-11
1266 -- No. A-7-2-11
1267 /*+SeqScan(/**/)*/
1268 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1269 INFO:  hint syntax error at or near "/**/)*/
1270 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1271 DETAIL:  Block comments nest doesn't supported.
1272               QUERY PLAN               
1273 ---------------------------------------
1274  Index Scan using t1_pkey on t1 "/**/"
1275    Index Cond: (c1 = 1)
1276 (2 rows)
1277
1278 /*+SeqScan(/**//**//**/)*/
1279 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1280 INFO:  hint syntax error at or near "/**//**//**/)*/
1281 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1282 DETAIL:  Block comments nest doesn't supported.
1283                   QUERY PLAN                   
1284 -----------------------------------------------
1285  Index Scan using t1_pkey on t1 "/**//**//**/"
1286    Index Cond: (c1 = 1)
1287 (2 rows)
1288
1289 -- No. A-5-5-12
1290 -- No. A-7-2-12
1291 /*+SeqScan("tT()""      
1292 Set/**/あ")*/
1293 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""       
1294 Set/**/あ" WHERE "tT()""       
1295 Set/**/あ".c1 = 1;
1296 INFO:  hint syntax error at or near "/**/あ")*/
1297 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""       
1298 Set/**/あ" WHERE "tT()""       
1299 Set/**/あ".c1 = 1;"
1300 DETAIL:  Block comments nest doesn't supported.
1301                 QUERY PLAN                
1302 ------------------------------------------
1303  Index Scan using t1_pkey on t1 "tT()""  
1304  Set/**/あ"
1305    Index Cond: (c1 = 1)
1306 (3 rows)
1307
1308 --"
1309 /*+SeqScan("tT()""      
1310 Setあ")*/
1311 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""       
1312 Setあ" WHERE "tT()""   
1313 Setあ".c1 = 1;
1314 LOG:  pg_hint_plan:
1315 used hint:
1316 SeqScan("tT()""         
1317 Setあ")
1318 not used hint:
1319 duplication hint:
1320 error hint:
1321
1322         QUERY PLAN        
1323 --------------------------
1324  Seq Scan on t1 "tT()""  
1325  Setあ"
1326    Filter: (c1 = 1)
1327 (3 rows)
1328
1329 ----
1330 ---- No. A-5-6 hint parse error
1331 ----
1332 -- No. A-5-6-1
1333 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1334 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1335 INFO:  hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1336 DETAIL:  Opened parenthesis is necessary.
1337 LOG:  pg_hint_plan:
1338 used hint:
1339 Set(enable_indexscan off)
1340 not used hint:
1341 duplication hint:
1342 error hint:
1343
1344              QUERY PLAN             
1345 ------------------------------------
1346  Bitmap Heap Scan on t1
1347    Recheck Cond: (c1 = 1)
1348    ->  Bitmap Index Scan on t1_pkey
1349          Index Cond: (c1 = 1)
1350 (4 rows)
1351
1352 -- No. A-5-6-2
1353 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1354 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1355 INFO:  hint syntax error at or near "Set(enable_bitmapscan off)SeqScan(t1)"
1356 DETAIL:  Closed parenthesis is necessary.
1357 LOG:  pg_hint_plan:
1358 used hint:
1359 Set(enable_indexscan off)
1360 not used hint:
1361 duplication hint:
1362 error hint:
1363
1364              QUERY PLAN             
1365 ------------------------------------
1366  Bitmap Heap Scan on t1
1367    Recheck Cond: (c1 = 1)
1368    ->  Bitmap Index Scan on t1_pkey
1369          Index Cond: (c1 = 1)
1370 (4 rows)
1371
1372 -- No. A-5-6-3
1373 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1374 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1375 INFO:  hint syntax error at or near ""
1376 DETAIL:  Unterminated quoted parameter value.
1377 LOG:  pg_hint_plan:
1378 used hint:
1379 Set(enable_indexscan off)
1380 not used hint:
1381 duplication hint:
1382 error hint:
1383
1384              QUERY PLAN             
1385 ------------------------------------
1386  Bitmap Heap Scan on t1
1387    Recheck Cond: (c1 = 1)
1388    ->  Bitmap Index Scan on t1_pkey
1389          Index Cond: (c1 = 1)
1390 (4 rows)
1391
1392 -- No. A-5-6-4
1393 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1394 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1395 INFO:  hint syntax error at or near ")Set(enable_bitmapscan off)"
1396 DETAIL:  Relation name is necessary.
1397 LOG:  pg_hint_plan:
1398 used hint:
1399 Set(enable_indexscan off)
1400 not used hint:
1401 duplication hint:
1402 error hint:
1403
1404              QUERY PLAN             
1405 ------------------------------------
1406  Bitmap Heap Scan on t1
1407    Recheck Cond: (c1 = 1)
1408    ->  Bitmap Index Scan on t1_pkey
1409          Index Cond: (c1 = 1)
1410 (4 rows)
1411
1412 -- No. A-5-6-5
1413 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1414 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1415 INFO:  hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1416 DETAIL:  Keyword "NoSet" does not exist.
1417 LOG:  pg_hint_plan:
1418 used hint:
1419 Set(enable_indexscan off)
1420 not used hint:
1421 duplication hint:
1422 error hint:
1423
1424              QUERY PLAN             
1425 ------------------------------------
1426  Bitmap Heap Scan on t1
1427    Recheck Cond: (c1 = 1)
1428    ->  Bitmap Index Scan on t1_pkey
1429          Index Cond: (c1 = 1)
1430 (4 rows)
1431
1432 -- No. A-5-6-6
1433 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1434 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1435 INFO:  hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1436 DETAIL:  Keyword ""Set"" does not exist.
1437 LOG:  pg_hint_plan:
1438 used hint:
1439 Set(enable_indexscan off)
1440 not used hint:
1441 duplication hint:
1442 error hint:
1443
1444              QUERY PLAN             
1445 ------------------------------------
1446  Bitmap Heap Scan on t1
1447    Recheck Cond: (c1 = 1)
1448    ->  Bitmap Index Scan on t1_pkey
1449          Index Cond: (c1 = 1)
1450 (4 rows)
1451
1452 -- No. A-5-6-7
1453 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1454 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1455 INFO:  hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1456 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1457 DETAIL:  Block comments nest doesn't supported.
1458            QUERY PLAN           
1459 --------------------------------
1460  Index Scan using t1_pkey on t1
1461    Index Cond: (c1 = 1)
1462 (2 rows)
1463
1464 ----
1465 ---- No. A-6-1 original GUC parameter
1466 ----
1467 -- No. A-6-1-1
1468 SET ROLE super_user;
1469 SET pg_hint_plan.debug_print TO off;
1470 SHOW pg_hint_plan.enable;
1471  pg_hint_plan.enable 
1472 ---------------------
1473  on
1474 (1 row)
1475
1476 SHOW pg_hint_plan.debug_print;
1477  pg_hint_plan.debug_print 
1478 --------------------------
1479  off
1480 (1 row)
1481
1482 SHOW pg_hint_plan.parse_messages;
1483  pg_hint_plan.parse_messages 
1484 -----------------------------
1485  info
1486 (1 row)
1487
1488 SET pg_hint_plan.enable TO off;
1489 SET pg_hint_plan.debug_print TO on;
1490 SET pg_hint_plan.parse_messages TO error;
1491 SHOW pg_hint_plan.enable;
1492  pg_hint_plan.enable 
1493 ---------------------
1494  off
1495 (1 row)
1496
1497 SHOW pg_hint_plan.debug_print;
1498  pg_hint_plan.debug_print 
1499 --------------------------
1500  on
1501 (1 row)
1502
1503 SHOW pg_hint_plan.parse_messages;
1504  pg_hint_plan.parse_messages 
1505 -----------------------------
1506  error
1507 (1 row)
1508
1509 RESET pg_hint_plan.enable;
1510 RESET pg_hint_plan.debug_print;
1511 RESET pg_hint_plan.parse_messages;
1512 SHOW pg_hint_plan.enable;
1513  pg_hint_plan.enable 
1514 ---------------------
1515  on
1516 (1 row)
1517
1518 SHOW pg_hint_plan.debug_print;
1519  pg_hint_plan.debug_print 
1520 --------------------------
1521  off
1522 (1 row)
1523
1524 SHOW pg_hint_plan.parse_messages;
1525  pg_hint_plan.parse_messages 
1526 -----------------------------
1527  info
1528 (1 row)
1529
1530 -- No. A-6-1-2
1531 SET ROLE normal_user;
1532 SHOW pg_hint_plan.enable;
1533  pg_hint_plan.enable 
1534 ---------------------
1535  on
1536 (1 row)
1537
1538 SHOW pg_hint_plan.debug_print;
1539  pg_hint_plan.debug_print 
1540 --------------------------
1541  off
1542 (1 row)
1543
1544 SHOW pg_hint_plan.parse_messages;
1545  pg_hint_plan.parse_messages 
1546 -----------------------------
1547  info
1548 (1 row)
1549
1550 SET pg_hint_plan.enable TO off;
1551 SET pg_hint_plan.debug_print TO on;
1552 SET pg_hint_plan.parse_messages TO error;
1553 SHOW pg_hint_plan.enable;
1554  pg_hint_plan.enable 
1555 ---------------------
1556  off
1557 (1 row)
1558
1559 SHOW pg_hint_plan.debug_print;
1560  pg_hint_plan.debug_print 
1561 --------------------------
1562  on
1563 (1 row)
1564
1565 SHOW pg_hint_plan.parse_messages;
1566  pg_hint_plan.parse_messages 
1567 -----------------------------
1568  error
1569 (1 row)
1570
1571 RESET pg_hint_plan.enable;
1572 RESET pg_hint_plan.debug_print;
1573 RESET pg_hint_plan.parse_messages;
1574 SHOW pg_hint_plan.enable;
1575  pg_hint_plan.enable 
1576 ---------------------
1577  on
1578 (1 row)
1579
1580 SHOW pg_hint_plan.debug_print;
1581  pg_hint_plan.debug_print 
1582 --------------------------
1583  off
1584 (1 row)
1585
1586 SHOW pg_hint_plan.parse_messages;
1587  pg_hint_plan.parse_messages 
1588 -----------------------------
1589  info
1590 (1 row)
1591
1592 RESET ROLE;
1593 ----
1594 ---- No. A-6-2 original GUC parameter pg_hint_plan.enable
1595 ----
1596 -- No. A-6-2-1
1597 SET pg_hint_plan.enable TO on;
1598 SHOW pg_hint_plan.enable;
1599  pg_hint_plan.enable 
1600 ---------------------
1601  on
1602 (1 row)
1603
1604 /*+Set(enable_indexscan off)*/
1605 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1606              QUERY PLAN             
1607 ------------------------------------
1608  Bitmap Heap Scan on t1
1609    Recheck Cond: (c1 = 1)
1610    ->  Bitmap Index Scan on t1_pkey
1611          Index Cond: (c1 = 1)
1612 (4 rows)
1613
1614 -- No. A-6-2-2
1615 SET pg_hint_plan.enable TO off;
1616 SHOW pg_hint_plan.enable;
1617  pg_hint_plan.enable 
1618 ---------------------
1619  off
1620 (1 row)
1621
1622 /*+Set(enable_indexscan off)*/
1623 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1624            QUERY PLAN           
1625 --------------------------------
1626  Index Scan using t1_pkey on t1
1627    Index Cond: (c1 = 1)
1628 (2 rows)
1629
1630 -- No. A-6-2-3
1631 SET pg_hint_plan.enable TO DEFAULT;
1632 SHOW pg_hint_plan.enable;
1633  pg_hint_plan.enable 
1634 ---------------------
1635  on
1636 (1 row)
1637
1638 /*+Set(enable_indexscan off)*/
1639 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1640              QUERY PLAN             
1641 ------------------------------------
1642  Bitmap Heap Scan on t1
1643    Recheck Cond: (c1 = 1)
1644    ->  Bitmap Index Scan on t1_pkey
1645          Index Cond: (c1 = 1)
1646 (4 rows)
1647
1648 -- No. A-6-2-4
1649 SET pg_hint_plan.enable TO enable;
1650 ERROR:  parameter "pg_hint_plan.enable" requires a Boolean value
1651 SHOW pg_hint_plan.enable;
1652  pg_hint_plan.enable 
1653 ---------------------
1654  on
1655 (1 row)
1656
1657 ----
1658 ---- No. A-6-3 original GUC parameter pg_hint_plan.debug_print
1659 ----
1660 -- No. A-6-3-1
1661 SET pg_hint_plan.debug_print TO on;
1662 SHOW pg_hint_plan.debug_print;
1663  pg_hint_plan.debug_print 
1664 --------------------------
1665  on
1666 (1 row)
1667
1668 /*+Set(enable_indexscan off)*/
1669 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1670 LOG:  pg_hint_plan:
1671 used hint:
1672 Set(enable_indexscan off)
1673 not used hint:
1674 duplication hint:
1675 error hint:
1676
1677              QUERY PLAN             
1678 ------------------------------------
1679  Bitmap Heap Scan on t1
1680    Recheck Cond: (c1 = 1)
1681    ->  Bitmap Index Scan on t1_pkey
1682          Index Cond: (c1 = 1)
1683 (4 rows)
1684
1685 -- No. A-6-3-2
1686 SET pg_hint_plan.debug_print TO off;
1687 SHOW pg_hint_plan.debug_print;
1688  pg_hint_plan.debug_print 
1689 --------------------------
1690  off
1691 (1 row)
1692
1693 /*+Set(enable_indexscan off)*/
1694 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1695              QUERY PLAN             
1696 ------------------------------------
1697  Bitmap Heap Scan on t1
1698    Recheck Cond: (c1 = 1)
1699    ->  Bitmap Index Scan on t1_pkey
1700          Index Cond: (c1 = 1)
1701 (4 rows)
1702
1703 -- No. A-6-3-3
1704 SET pg_hint_plan.debug_print TO DEFAULT;
1705 SHOW pg_hint_plan.debug_print;
1706  pg_hint_plan.debug_print 
1707 --------------------------
1708  off
1709 (1 row)
1710
1711 /*+Set(enable_indexscan off)*/
1712 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1713              QUERY PLAN             
1714 ------------------------------------
1715  Bitmap Heap Scan on t1
1716    Recheck Cond: (c1 = 1)
1717    ->  Bitmap Index Scan on t1_pkey
1718          Index Cond: (c1 = 1)
1719 (4 rows)
1720
1721 -- No. A-6-3-4
1722 SET pg_hint_plan.debug_print TO enable;
1723 ERROR:  parameter "pg_hint_plan.debug_print" requires a Boolean value
1724 SHOW pg_hint_plan.debug_print;
1725  pg_hint_plan.debug_print 
1726 --------------------------
1727  off
1728 (1 row)
1729
1730 ----
1731 ---- No. A-6-4 original GUC parameter pg_hint_plan.parse_messages
1732 ----
1733 SET client_min_messages TO debug5;
1734 DEBUG:  CommitTransactionCommand
1735 DEBUG:  CommitTransaction
1736 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1737 -- No. A-6-4-1
1738 SET pg_hint_plan.parse_messages TO debug5;
1739 DEBUG:  StartTransactionCommand
1740 DEBUG:  StartTransaction
1741 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1742 DEBUG:  ProcessUtility
1743 DEBUG:  CommitTransactionCommand
1744 DEBUG:  CommitTransaction
1745 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1746 SHOW pg_hint_plan.parse_messages;
1747 DEBUG:  StartTransactionCommand
1748 DEBUG:  StartTransaction
1749 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1750 DEBUG:  ProcessUtility
1751 DEBUG:  CommitTransactionCommand
1752 DEBUG:  CommitTransaction
1753 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1754  pg_hint_plan.parse_messages 
1755 -----------------------------
1756  debug5
1757 (1 row)
1758
1759 /*+Set*/SELECT 1;
1760 DEBUG:  StartTransactionCommand
1761 DEBUG:  StartTransaction
1762 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1763 DEBUG:  hint syntax error at or near ""
1764 DETAIL:  Opened parenthesis is necessary.
1765 DEBUG:  CommitTransactionCommand
1766 DEBUG:  CommitTransaction
1767 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1768  ?column? 
1769 ----------
1770         1
1771 (1 row)
1772
1773 SET client_min_messages TO debug4;
1774 DEBUG:  StartTransactionCommand
1775 DEBUG:  StartTransaction
1776 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1777 DEBUG:  ProcessUtility
1778 DEBUG:  CommitTransactionCommand
1779 DEBUG:  CommitTransaction
1780 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1781 /*+Set*/SELECT 1;
1782 DEBUG:  StartTransactionCommand
1783 DEBUG:  StartTransaction
1784 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1785 DEBUG:  CommitTransactionCommand
1786 DEBUG:  CommitTransaction
1787 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1788  ?column? 
1789 ----------
1790         1
1791 (1 row)
1792
1793 -- No. A-6-4-2
1794 SET pg_hint_plan.parse_messages TO debug4;
1795 DEBUG:  StartTransactionCommand
1796 DEBUG:  StartTransaction
1797 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1798 DEBUG:  ProcessUtility
1799 DEBUG:  CommitTransactionCommand
1800 DEBUG:  CommitTransaction
1801 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1802 SHOW pg_hint_plan.parse_messages;
1803 DEBUG:  StartTransactionCommand
1804 DEBUG:  StartTransaction
1805 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1806 DEBUG:  ProcessUtility
1807 DEBUG:  CommitTransactionCommand
1808 DEBUG:  CommitTransaction
1809 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1810  pg_hint_plan.parse_messages 
1811 -----------------------------
1812  debug4
1813 (1 row)
1814
1815 /*+Set*/SELECT 1;
1816 DEBUG:  StartTransactionCommand
1817 DEBUG:  StartTransaction
1818 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1819 DEBUG:  hint syntax error at or near ""
1820 DETAIL:  Opened parenthesis is necessary.
1821 DEBUG:  CommitTransactionCommand
1822 DEBUG:  CommitTransaction
1823 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1824  ?column? 
1825 ----------
1826         1
1827 (1 row)
1828
1829 SET client_min_messages TO debug3;
1830 DEBUG:  StartTransactionCommand
1831 DEBUG:  StartTransaction
1832 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1833 DEBUG:  ProcessUtility
1834 DEBUG:  CommitTransactionCommand
1835 DEBUG:  CommitTransaction
1836 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1837 /*+Set*/SELECT 1;
1838 DEBUG:  StartTransactionCommand
1839 DEBUG:  StartTransaction
1840 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1841 DEBUG:  CommitTransactionCommand
1842 DEBUG:  CommitTransaction
1843 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1844  ?column? 
1845 ----------
1846         1
1847 (1 row)
1848
1849 -- No. A-6-4-3
1850 SET pg_hint_plan.parse_messages TO debug3;
1851 DEBUG:  StartTransactionCommand
1852 DEBUG:  StartTransaction
1853 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1854 DEBUG:  ProcessUtility
1855 DEBUG:  CommitTransactionCommand
1856 DEBUG:  CommitTransaction
1857 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1858 SHOW pg_hint_plan.parse_messages;
1859 DEBUG:  StartTransactionCommand
1860 DEBUG:  StartTransaction
1861 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1862 DEBUG:  ProcessUtility
1863 DEBUG:  CommitTransactionCommand
1864 DEBUG:  CommitTransaction
1865 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1866  pg_hint_plan.parse_messages 
1867 -----------------------------
1868  debug3
1869 (1 row)
1870
1871 /*+Set*/SELECT 1;
1872 DEBUG:  StartTransactionCommand
1873 DEBUG:  StartTransaction
1874 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1875 DEBUG:  hint syntax error at or near ""
1876 DETAIL:  Opened parenthesis is necessary.
1877 DEBUG:  CommitTransactionCommand
1878 DEBUG:  CommitTransaction
1879 DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1880  ?column? 
1881 ----------
1882         1
1883 (1 row)
1884
1885 SET client_min_messages TO debug2;
1886 DEBUG:  StartTransactionCommand
1887 DEBUG:  StartTransaction
1888 DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 
1889 DEBUG:  ProcessUtility
1890 /*+Set*/SELECT 1;
1891  ?column? 
1892 ----------
1893         1
1894 (1 row)
1895
1896 -- No. A-6-4-4
1897 SET pg_hint_plan.parse_messages TO debug2;
1898 SHOW pg_hint_plan.parse_messages;
1899  pg_hint_plan.parse_messages 
1900 -----------------------------
1901  debug
1902 (1 row)
1903
1904 /*+Set*/SELECT 1;
1905 DEBUG:  hint syntax error at or near ""
1906 DETAIL:  Opened parenthesis is necessary.
1907  ?column? 
1908 ----------
1909         1
1910 (1 row)
1911
1912 SET client_min_messages TO debug1;
1913 /*+Set*/SELECT 1;
1914  ?column? 
1915 ----------
1916         1
1917 (1 row)
1918
1919 -- No. A-6-4-5
1920 SET pg_hint_plan.parse_messages TO debug1;
1921 SHOW pg_hint_plan.parse_messages;
1922  pg_hint_plan.parse_messages 
1923 -----------------------------
1924  debug1
1925 (1 row)
1926
1927 /*+Set*/SELECT 1;
1928 DEBUG:  hint syntax error at or near ""
1929 DETAIL:  Opened parenthesis is necessary.
1930  ?column? 
1931 ----------
1932         1
1933 (1 row)
1934
1935 SET client_min_messages TO log;
1936 /*+Set*/SELECT 1;
1937  ?column? 
1938 ----------
1939         1
1940 (1 row)
1941
1942 -- No. A-6-4-6
1943 SET pg_hint_plan.parse_messages TO log;
1944 SHOW pg_hint_plan.parse_messages;
1945  pg_hint_plan.parse_messages 
1946 -----------------------------
1947  log
1948 (1 row)
1949
1950 /*+Set*/SELECT 1;
1951 LOG:  hint syntax error at or near ""
1952 DETAIL:  Opened parenthesis is necessary.
1953  ?column? 
1954 ----------
1955         1
1956 (1 row)
1957
1958 SET client_min_messages TO info;
1959 /*+Set*/SELECT 1;
1960  ?column? 
1961 ----------
1962         1
1963 (1 row)
1964
1965 -- No. A-6-4-7
1966 SET pg_hint_plan.parse_messages TO info;
1967 SHOW pg_hint_plan.parse_messages;
1968  pg_hint_plan.parse_messages 
1969 -----------------------------
1970  info
1971 (1 row)
1972
1973 /*+Set*/SELECT 1;
1974 INFO:  hint syntax error at or near ""
1975 DETAIL:  Opened parenthesis is necessary.
1976  ?column? 
1977 ----------
1978         1
1979 (1 row)
1980
1981 SET client_min_messages TO notice;
1982 /*+Set*/SELECT 1;
1983 INFO:  hint syntax error at or near ""
1984 DETAIL:  Opened parenthesis is necessary.
1985  ?column? 
1986 ----------
1987         1
1988 (1 row)
1989
1990 -- No. A-6-4-8
1991 SET pg_hint_plan.parse_messages TO notice;
1992 SHOW pg_hint_plan.parse_messages;
1993  pg_hint_plan.parse_messages 
1994 -----------------------------
1995  notice
1996 (1 row)
1997
1998 /*+Set*/SELECT 1;
1999 NOTICE:  hint syntax error at or near ""
2000 DETAIL:  Opened parenthesis is necessary.
2001  ?column? 
2002 ----------
2003         1
2004 (1 row)
2005
2006 SET client_min_messages TO warning;
2007 /*+Set*/SELECT 1;
2008  ?column? 
2009 ----------
2010         1
2011 (1 row)
2012
2013 -- No. A-6-4-9
2014 SET pg_hint_plan.parse_messages TO warning;
2015 SHOW pg_hint_plan.parse_messages;
2016  pg_hint_plan.parse_messages 
2017 -----------------------------
2018  warning
2019 (1 row)
2020
2021 /*+Set*/SELECT 1;
2022 WARNING:  hint syntax error at or near ""
2023 DETAIL:  Opened parenthesis is necessary.
2024  ?column? 
2025 ----------
2026         1
2027 (1 row)
2028
2029 SET client_min_messages TO error;
2030 /*+Set*/SELECT 1;
2031  ?column? 
2032 ----------
2033         1
2034 (1 row)
2035
2036 -- No. A-6-4-10
2037 SET pg_hint_plan.parse_messages TO error;
2038 SHOW pg_hint_plan.parse_messages;
2039  pg_hint_plan.parse_messages 
2040 -----------------------------
2041  error
2042 (1 row)
2043
2044 /*+Set*/SELECT 1;
2045 ERROR:  hint syntax error at or near ""
2046 DETAIL:  Opened parenthesis is necessary.
2047 SET client_min_messages TO fatal;
2048 /*+Set*/SELECT 1;
2049 -- No. A-6-4-11
2050 RESET client_min_messages;
2051 SET pg_hint_plan.parse_messages TO DEFAULT;
2052 SHOW pg_hint_plan.parse_messages;
2053  pg_hint_plan.parse_messages 
2054 -----------------------------
2055  info
2056 (1 row)
2057
2058 /*+Set*/SELECT 1;
2059 INFO:  hint syntax error at or near ""
2060 DETAIL:  Opened parenthesis is necessary.
2061  ?column? 
2062 ----------
2063         1
2064 (1 row)
2065
2066 -- No. A-6-4-12
2067 SET pg_hint_plan.parse_messages TO fatal;
2068 ERROR:  invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2069 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2070 SHOW pg_hint_plan.parse_messages;
2071  pg_hint_plan.parse_messages 
2072 -----------------------------
2073  info
2074 (1 row)
2075
2076 -- No. A-6-4-13
2077 SET pg_hint_plan.parse_messages TO panic;
2078 ERROR:  invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2079 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2080 SHOW pg_hint_plan.parse_messages;
2081  pg_hint_plan.parse_messages 
2082 -----------------------------
2083  info
2084 (1 row)
2085
2086 -- No. A-6-4-14
2087 SET pg_hint_plan.parse_messages TO on;
2088 ERROR:  invalid value for parameter "pg_hint_plan.parse_messages": "on"
2089 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2090 SHOW pg_hint_plan.parse_messages;
2091  pg_hint_plan.parse_messages 
2092 -----------------------------
2093  info
2094 (1 row)
2095
2096 ----
2097 ---- No. A-7-1 parse error message output
2098 ----
2099 -- No. A-7-1-1
2100 /*+"Set"(enable_indexscan on)*/SELECT 1;
2101 INFO:  hint syntax error at or near ""Set"(enable_indexscan on)"
2102 DETAIL:  Keyword ""Set"" does not exist.
2103  ?column? 
2104 ----------
2105         1
2106 (1 row)
2107
2108 /*+Set()(enable_indexscan on)*/SELECT 1;
2109 INFO:  hint syntax error at or near ")(enable_indexscan on)"
2110 DETAIL:  Parameter name is necessary.
2111  ?column? 
2112 ----------
2113         1
2114 (1 row)
2115
2116 /*+Set(enable_indexscan on*/SELECT 1;
2117 INFO:  hint syntax error at or near ""
2118 DETAIL:  Closed parenthesis is necessary.
2119  ?column? 
2120 ----------
2121         1
2122 (1 row)
2123
2124 ----
2125 ---- No. A-7-3 hint state output
2126 ----
2127 SET pg_hint_plan.debug_print TO on;
2128 SET client_min_messages TO LOG;
2129 -- No. A-7-3-1
2130 /*+SeqScan(t1)*/
2131 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2132 LOG:  pg_hint_plan:
2133 used hint:
2134 SeqScan(t1)
2135 not used hint:
2136 duplication hint:
2137 error hint:
2138
2139      QUERY PLAN     
2140 --------------------
2141  Seq Scan on t1
2142    Filter: (c1 = 1)
2143 (2 rows)
2144
2145 -- No. A-7-3-2
2146 /*+SeqScan(no_table)*/
2147 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2148 LOG:  pg_hint_plan:
2149 used hint:
2150 not used hint:
2151 SeqScan(no_table)
2152 duplication hint:
2153 error hint:
2154
2155            QUERY PLAN           
2156 --------------------------------
2157  Index Scan using t1_pkey on t1
2158    Index Cond: (c1 = 1)
2159 (2 rows)
2160
2161 -- No. A-7-3-3
2162 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2163             QUERY PLAN             
2164 -----------------------------------
2165  Tid Scan on t1
2166    TID Cond: (ctid = '(1,1)'::tid)
2167    Filter: (c1 = 1)
2168 (3 rows)
2169
2170 /*+TidScan(t1)BitmapScan(t1)*/
2171 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2172 INFO:  hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2173 DETAIL:  Conflict scan method hint.
2174 LOG:  pg_hint_plan:
2175 used hint:
2176 BitmapScan(t1)
2177 not used hint:
2178 duplication hint:
2179 TidScan(t1)
2180 error hint:
2181
2182              QUERY PLAN             
2183 ------------------------------------
2184  Bitmap Heap Scan on t1
2185    Recheck Cond: (c1 = 1)
2186    Filter: (ctid = '(1,1)'::tid)
2187    ->  Bitmap Index Scan on t1_pkey
2188          Index Cond: (c1 = 1)
2189 (5 rows)
2190
2191 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2192 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2193 INFO:  hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2194 DETAIL:  Conflict scan method hint.
2195 INFO:  hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2196 DETAIL:  Conflict scan method hint.
2197 LOG:  pg_hint_plan:
2198 used hint:
2199 IndexScan(t1)
2200 not used hint:
2201 duplication hint:
2202 TidScan(t1)
2203 BitmapScan(t1)
2204 error hint:
2205
2206            QUERY PLAN            
2207 ---------------------------------
2208  Index Scan using t1_pkey on t1
2209    Index Cond: (c1 = 1)
2210    Filter: (ctid = '(1,1)'::tid)
2211 (3 rows)
2212
2213 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2214 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2215 INFO:  hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2216 DETAIL:  Conflict scan method hint.
2217 INFO:  hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2218 DETAIL:  Conflict scan method hint.
2219 INFO:  hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2220 DETAIL:  Conflict scan method hint.
2221 LOG:  pg_hint_plan:
2222 used hint:
2223 SeqScan(t1)
2224 not used hint:
2225 duplication hint:
2226 TidScan(t1)
2227 BitmapScan(t1)
2228 IndexScan(t1)
2229 error hint:
2230
2231                    QUERY PLAN                   
2232 ------------------------------------------------
2233  Seq Scan on t1
2234    Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2235 (2 rows)
2236
2237 -- No. A-7-3-4
2238 /*+Set(enable_indexscan enable)*/
2239 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2240 INFO:  parameter "enable_indexscan" requires a Boolean value
2241 LOG:  pg_hint_plan:
2242 used hint:
2243 not used hint:
2244 duplication hint:
2245 error hint:
2246 Set(enable_indexscan enable)
2247
2248            QUERY PLAN           
2249 --------------------------------
2250  Index Scan using t1_pkey on t1
2251    Index Cond: (c1 = 1)
2252 (2 rows)
2253
2254 ----
2255 ---- No. A-8-1 hint state output
2256 ----
2257 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2258 EXPLAIN (COSTS false) EXECUTE p1;
2259            QUERY PLAN           
2260 --------------------------------
2261  Index Scan using t1_pkey on t1
2262    Index Cond: (c1 = 1)
2263 (2 rows)
2264
2265 DEALLOCATE p1;
2266 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2267 EXPLAIN (COSTS false) EXECUTE p1 (1);
2268      QUERY PLAN      
2269 ---------------------
2270  Seq Scan on t1
2271    Filter: (c1 < $1)
2272 (2 rows)
2273
2274 DEALLOCATE p1;
2275 -- No. A-8-1-1
2276 -- No. A-8-1-2
2277 /*+SeqScan(t1)*/
2278 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2279 LOG:  pg_hint_plan:
2280 used hint:
2281 SeqScan(t1)
2282 not used hint:
2283 duplication hint:
2284 error hint:
2285
2286 /*+BitmapScan(t1)*/
2287 EXPLAIN (COSTS false) EXECUTE p1;
2288      QUERY PLAN     
2289 --------------------
2290  Seq Scan on t1
2291    Filter: (c1 = 1)
2292 (2 rows)
2293
2294 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2295 /*+BitmapScan(t1)*/
2296 EXPLAIN (COSTS false) EXECUTE p1;
2297 LOG:  pg_hint_plan:
2298 used hint:
2299 SeqScan(t1)
2300 not used hint:
2301 duplication hint:
2302 error hint:
2303
2304      QUERY PLAN     
2305 --------------------
2306  Seq Scan on t1
2307    Filter: (c1 = 1)
2308 (2 rows)
2309
2310 DEALLOCATE p1;
2311 /*+BitmapScan(t1)*/
2312 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2313 LOG:  pg_hint_plan:
2314 used hint:
2315 BitmapScan(t1)
2316 not used hint:
2317 duplication hint:
2318 error hint:
2319
2320 /*+SeqScan(t1)*/
2321 EXPLAIN (COSTS false) EXECUTE p1 (1);
2322              QUERY PLAN             
2323 ------------------------------------
2324  Bitmap Heap Scan on t1
2325    Recheck Cond: (c1 < $1)
2326    ->  Bitmap Index Scan on t1_pkey
2327          Index Cond: (c1 < $1)
2328 (4 rows)
2329
2330 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2331 /*+SeqScan(t1)*/
2332 EXPLAIN (COSTS false) EXECUTE p1 (1);
2333 LOG:  pg_hint_plan:
2334 used hint:
2335 BitmapScan(t1)
2336 not used hint:
2337 duplication hint:
2338 error hint:
2339
2340              QUERY PLAN             
2341 ------------------------------------
2342  Bitmap Heap Scan on t1
2343    Recheck Cond: (c1 < $1)
2344    ->  Bitmap Index Scan on t1_pkey
2345          Index Cond: (c1 < $1)
2346 (4 rows)
2347
2348 DEALLOCATE p1;
2349 -- No. A-8-1-3
2350 -- No. A-8-1-4
2351 /*+SeqScan(t1)*/
2352 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2353 LOG:  pg_hint_plan:
2354 used hint:
2355 SeqScan(t1)
2356 not used hint:
2357 duplication hint:
2358 error hint:
2359
2360 EXPLAIN (COSTS false) EXECUTE p1;
2361      QUERY PLAN     
2362 --------------------
2363  Seq Scan on t1
2364    Filter: (c1 = 1)
2365 (2 rows)
2366
2367 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2368 EXPLAIN (COSTS false) EXECUTE p1;
2369 LOG:  pg_hint_plan:
2370 used hint:
2371 SeqScan(t1)
2372 not used hint:
2373 duplication hint:
2374 error hint:
2375
2376      QUERY PLAN     
2377 --------------------
2378  Seq Scan on t1
2379    Filter: (c1 = 1)
2380 (2 rows)
2381
2382 DEALLOCATE p1;
2383 /*+BitmapScan(t1)*/
2384 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2385 LOG:  pg_hint_plan:
2386 used hint:
2387 BitmapScan(t1)
2388 not used hint:
2389 duplication hint:
2390 error hint:
2391
2392 EXPLAIN (COSTS false) EXECUTE p1 (1);
2393              QUERY PLAN             
2394 ------------------------------------
2395  Bitmap Heap Scan on t1
2396    Recheck Cond: (c1 < $1)
2397    ->  Bitmap Index Scan on t1_pkey
2398          Index Cond: (c1 < $1)
2399 (4 rows)
2400
2401 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2402 EXPLAIN (COSTS false) EXECUTE p1 (1);
2403 LOG:  pg_hint_plan:
2404 used hint:
2405 BitmapScan(t1)
2406 not used hint:
2407 duplication hint:
2408 error hint:
2409
2410              QUERY PLAN             
2411 ------------------------------------
2412  Bitmap Heap Scan on t1
2413    Recheck Cond: (c1 < $1)
2414    ->  Bitmap Index Scan on t1_pkey
2415          Index Cond: (c1 < $1)
2416 (4 rows)
2417
2418 DEALLOCATE p1;
2419 -- No. A-8-1-5
2420 -- No. A-8-1-6
2421 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2422 /*+BitmapScan(t1)*/
2423 EXPLAIN (COSTS false) EXECUTE p1;
2424            QUERY PLAN           
2425 --------------------------------
2426  Index Scan using t1_pkey on t1
2427    Index Cond: (c1 = 1)
2428 (2 rows)
2429
2430 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2431 /*+BitmapScan(t1)*/
2432 EXPLAIN (COSTS false) EXECUTE p1;
2433            QUERY PLAN           
2434 --------------------------------
2435  Index Scan using t1_pkey on t1
2436    Index Cond: (c1 = 1)
2437 (2 rows)
2438
2439 DEALLOCATE p1;
2440 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2441 /*+BitmapScan(t1)*/
2442 EXPLAIN (COSTS false) EXECUTE p1 (1);
2443      QUERY PLAN      
2444 ---------------------
2445  Seq Scan on t1
2446    Filter: (c1 < $1)
2447 (2 rows)
2448
2449 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2450 /*+BitmapScan(t1)*/
2451 EXPLAIN (COSTS false) EXECUTE p1 (1);
2452      QUERY PLAN      
2453 ---------------------
2454  Seq Scan on t1
2455    Filter: (c1 < $1)
2456 (2 rows)
2457
2458 DEALLOCATE p1;
2459 ----
2460 ---- No. A-8-4 EXECUTE statement name error
2461 ----
2462 -- No. A-8-4-1
2463 EXECUTE p1;
2464 ERROR:  prepared statement "p1" does not exist
2465 SHOW pg_hint_plan.debug_print;
2466  pg_hint_plan.debug_print 
2467 --------------------------
2468  on
2469 (1 row)
2470
2471 ----
2472 ---- No. A-9-5 EXECUTE statement name error
2473 ----
2474 -- No. A-9-5-1
2475 CREATE EXTENSION pg_stat_statements;
2476 SELECT pg_stat_statements_reset();
2477  pg_stat_statements_reset 
2478 --------------------------
2479  
2480 (1 row)
2481
2482 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2483  c1 | c2 | c3 | c4 
2484 ----+----+----+----
2485   1 |  1 |  1 | 1
2486 (1 row)
2487
2488 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2489 LOG:  pg_hint_plan:
2490 used hint:
2491 Set(enable_seqscan off)
2492 not used hint:
2493 duplication hint:
2494 error hint:
2495
2496  c1 | c2 | c3 | c4 
2497 ----+----+----+----
2498   1 |  1 |  1 | 1
2499 (1 row)
2500
2501 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2502 LOG:  pg_hint_plan:
2503 used hint:
2504 SeqScan(t1)
2505 not used hint:
2506 duplication hint:
2507 error hint:
2508
2509  c1 | c2 | c3 | c4 
2510 ----+----+----+----
2511   1 |  1 |  1 | 1
2512 (1 row)
2513
2514 SELECT s.query, s.calls
2515   FROM public.pg_stat_statements s
2516   JOIN pg_catalog.pg_database d
2517     ON (s.dbid = d.oid)
2518  ORDER BY 1;
2519                                query                               | calls 
2520 -------------------------------------------------------------------+-------
2521  /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;             |     1
2522  /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; |     1
2523  SELECT * FROM s1.t1 WHERE t1.c1 = 1;                              |     1
2524  SELECT pg_stat_statements_reset();                                |     1
2525 (4 rows)
2526
2527 ----
2528 ---- No. A-12-1 reset of global variable of core at the error
2529 ---- No. A-12-2 reset of global variable of original at the error
2530 ----
2531 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2532               QUERY PLAN              
2533 --------------------------------------
2534  Merge Join
2535    Merge Cond: (t1.c1 = t2.c1)
2536    ->  Index Scan using t1_pkey on t1
2537    ->  Sort
2538          Sort Key: t2.c1
2539          ->  Seq Scan on t2
2540 (6 rows)
2541
2542 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
2543 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2544 INFO:  hint syntax error at or near "NestLoop(t1 t1)"
2545 DETAIL:  Relation name "t1" is duplicate.
2546 LOG:  pg_hint_plan:
2547 used hint:
2548 SeqScan(t1)
2549 MergeJoin(t1 t2)
2550 Set(enable_seqscan off)
2551 Set(geqo_threshold 100)
2552 not used hint:
2553 duplication hint:
2554 error hint:
2555 NestLoop(t1 t1)
2556
2557 EXPLAIN (COSTS false) EXECUTE p1;
2558               QUERY PLAN              
2559 --------------------------------------
2560  Merge Join
2561    Merge Cond: (t1.c1 = t2.c1)
2562    ->  Sort
2563          Sort Key: t1.c1
2564          ->  Seq Scan on t1
2565    ->  Index Scan using t2_pkey on t2
2566 (6 rows)
2567
2568 -- No. A-12-1-1
2569 -- No. A-12-2-1
2570 SELECT name, setting FROM settings;
2571            name            |  setting  
2572 ---------------------------+-----------
2573  geqo                      | on
2574  geqo_effort               | 5
2575  geqo_generations          | 0
2576  geqo_pool_size            | 0
2577  geqo_seed                 | 0
2578  geqo_selection_bias       | 2
2579  geqo_threshold            | 12
2580  constraint_exclusion      | partition
2581  cursor_tuple_fraction     | 0.1
2582  default_statistics_target | 100
2583  from_collapse_limit       | 8
2584  join_collapse_limit       | 8
2585  cpu_index_tuple_cost      | 0.005
2586  cpu_operator_cost         | 0.0025
2587  cpu_tuple_cost            | 0.01
2588  effective_cache_size      | 16384
2589  random_page_cost          | 4
2590  seq_page_cost             | 1
2591  enable_bitmapscan         | on
2592  enable_hashagg            | on
2593  enable_hashjoin           | on
2594  enable_indexscan          | on
2595  enable_material           | on
2596  enable_mergejoin          | on
2597  enable_nestloop           | on
2598  enable_seqscan            | on
2599  enable_sort               | on
2600  enable_tidscan            | on
2601  client_min_messages       | log
2602 (29 rows)
2603
2604 SET pg_hint_plan.parse_messages TO error;
2605 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
2606 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2607 ERROR:  hint syntax error at or near "NestLoop(t1 t1)"
2608 DETAIL:  Relation name "t1" is duplicate.
2609 SELECT name, setting FROM settings;
2610            name            |  setting  
2611 ---------------------------+-----------
2612  geqo                      | on
2613  geqo_effort               | 5
2614  geqo_generations          | 0
2615  geqo_pool_size            | 0
2616  geqo_seed                 | 0
2617  geqo_selection_bias       | 2
2618  geqo_threshold            | 12
2619  constraint_exclusion      | partition
2620  cursor_tuple_fraction     | 0.1
2621  default_statistics_target | 100
2622  from_collapse_limit       | 8
2623  join_collapse_limit       | 8
2624  cpu_index_tuple_cost      | 0.005
2625  cpu_operator_cost         | 0.0025
2626  cpu_tuple_cost            | 0.01
2627  effective_cache_size      | 16384
2628  random_page_cost          | 4
2629  seq_page_cost             | 1
2630  enable_bitmapscan         | on
2631  enable_hashagg            | on
2632  enable_hashjoin           | on
2633  enable_indexscan          | on
2634  enable_material           | on
2635  enable_mergejoin          | on
2636  enable_nestloop           | on
2637  enable_seqscan            | on
2638  enable_sort               | on
2639  enable_tidscan            | on
2640  client_min_messages       | log
2641 (29 rows)
2642
2643 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
2644 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2645 LOG:  pg_hint_plan:
2646 used hint:
2647 SeqScan(t1)
2648 MergeJoin(t1 t2)
2649 Set(enable_seqscan off)
2650 Set(geqo_threshold 100)
2651 not used hint:
2652 duplication hint:
2653 error hint:
2654
2655               QUERY PLAN              
2656 --------------------------------------
2657  Merge Join
2658    Merge Cond: (t1.c1 = t2.c1)
2659    ->  Sort
2660          Sort Key: t1.c1
2661          ->  Seq Scan on t1
2662    ->  Index Scan using t2_pkey on t2
2663 (6 rows)
2664
2665 -- No. A-12-1-2
2666 -- No. A-12-2-2
2667 SELECT name, setting FROM settings;
2668            name            |  setting  
2669 ---------------------------+-----------
2670  geqo                      | on
2671  geqo_effort               | 5
2672  geqo_generations          | 0
2673  geqo_pool_size            | 0
2674  geqo_seed                 | 0
2675  geqo_selection_bias       | 2
2676  geqo_threshold            | 12
2677  constraint_exclusion      | partition
2678  cursor_tuple_fraction     | 0.1
2679  default_statistics_target | 100
2680  from_collapse_limit       | 8
2681  join_collapse_limit       | 8
2682  cpu_index_tuple_cost      | 0.005
2683  cpu_operator_cost         | 0.0025
2684  cpu_tuple_cost            | 0.01
2685  effective_cache_size      | 16384
2686  random_page_cost          | 4
2687  seq_page_cost             | 1
2688  enable_bitmapscan         | on
2689  enable_hashagg            | on
2690  enable_hashjoin           | on
2691  enable_indexscan          | on
2692  enable_material           | on
2693  enable_mergejoin          | on
2694  enable_nestloop           | on
2695  enable_seqscan            | on
2696  enable_sort               | on
2697  enable_tidscan            | on
2698  client_min_messages       | log
2699 (29 rows)
2700
2701 SET pg_hint_plan.parse_messages TO error;
2702 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
2703 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2704 ERROR:  hint syntax error at or near "NestLoop(t1 t1)"
2705 DETAIL:  Relation name "t1" is duplicate.
2706 SELECT name, setting FROM settings;
2707            name            |  setting  
2708 ---------------------------+-----------
2709  geqo                      | on
2710  geqo_effort               | 5
2711  geqo_generations          | 0
2712  geqo_pool_size            | 0
2713  geqo_seed                 | 0
2714  geqo_selection_bias       | 2
2715  geqo_threshold            | 12
2716  constraint_exclusion      | partition
2717  cursor_tuple_fraction     | 0.1
2718  default_statistics_target | 100
2719  from_collapse_limit       | 8
2720  join_collapse_limit       | 8
2721  cpu_index_tuple_cost      | 0.005
2722  cpu_operator_cost         | 0.0025
2723  cpu_tuple_cost            | 0.01
2724  effective_cache_size      | 16384
2725  random_page_cost          | 4
2726  seq_page_cost             | 1
2727  enable_bitmapscan         | on
2728  enable_hashagg            | on
2729  enable_hashjoin           | on
2730  enable_indexscan          | on
2731  enable_material           | on
2732  enable_mergejoin          | on
2733  enable_nestloop           | on
2734  enable_seqscan            | on
2735  enable_sort               | on
2736  enable_tidscan            | on
2737  client_min_messages       | log
2738 (29 rows)
2739
2740 EXPLAIN (COSTS false) EXECUTE p1;
2741               QUERY PLAN              
2742 --------------------------------------
2743  Merge Join
2744    Merge Cond: (t1.c1 = t2.c1)
2745    ->  Sort
2746          Sort Key: t1.c1
2747          ->  Seq Scan on t1
2748    ->  Index Scan using t2_pkey on t2
2749 (6 rows)
2750
2751 -- No. A-12-1-3
2752 -- No. A-12-2-3
2753 SELECT name, setting FROM settings;
2754            name            |  setting  
2755 ---------------------------+-----------
2756  geqo                      | on
2757  geqo_effort               | 5
2758  geqo_generations          | 0
2759  geqo_pool_size            | 0
2760  geqo_seed                 | 0
2761  geqo_selection_bias       | 2
2762  geqo_threshold            | 12
2763  constraint_exclusion      | partition
2764  cursor_tuple_fraction     | 0.1
2765  default_statistics_target | 100
2766  from_collapse_limit       | 8
2767  join_collapse_limit       | 8
2768  cpu_index_tuple_cost      | 0.005
2769  cpu_operator_cost         | 0.0025
2770  cpu_tuple_cost            | 0.01
2771  effective_cache_size      | 16384
2772  random_page_cost          | 4
2773  seq_page_cost             | 1
2774  enable_bitmapscan         | on
2775  enable_hashagg            | on
2776  enable_hashjoin           | on
2777  enable_indexscan          | on
2778  enable_material           | on
2779  enable_mergejoin          | on
2780  enable_nestloop           | on
2781  enable_seqscan            | on
2782  enable_sort               | on
2783  enable_tidscan            | on
2784  client_min_messages       | log
2785 (29 rows)
2786
2787 SET pg_hint_plan.parse_messages TO error;
2788 EXPLAIN (COSTS false) EXECUTE p2;
2789 ERROR:  prepared statement "p2" does not exist
2790 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
2791 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2792 LOG:  pg_hint_plan:
2793 used hint:
2794 SeqScan(t1)
2795 MergeJoin(t1 t2)
2796 Set(enable_seqscan off)
2797 Set(geqo_threshold 100)
2798 not used hint:
2799 duplication hint:
2800 error hint:
2801
2802               QUERY PLAN              
2803 --------------------------------------
2804  Merge Join
2805    Merge Cond: (t1.c1 = t2.c1)
2806    ->  Sort
2807          Sort Key: t1.c1
2808          ->  Seq Scan on t1
2809    ->  Index Scan using t2_pkey on t2
2810 (6 rows)
2811
2812 EXPLAIN (COSTS false) EXECUTE p1;
2813               QUERY PLAN              
2814 --------------------------------------
2815  Merge Join
2816    Merge Cond: (t1.c1 = t2.c1)
2817    ->  Sort
2818          Sort Key: t1.c1
2819          ->  Seq Scan on t1
2820    ->  Index Scan using t2_pkey on t2
2821 (6 rows)
2822
2823 SELECT name, setting FROM settings;
2824            name            |  setting  
2825 ---------------------------+-----------
2826  geqo                      | on
2827  geqo_effort               | 5
2828  geqo_generations          | 0
2829  geqo_pool_size            | 0
2830  geqo_seed                 | 0
2831  geqo_selection_bias       | 2
2832  geqo_threshold            | 12
2833  constraint_exclusion      | partition
2834  cursor_tuple_fraction     | 0.1
2835  default_statistics_target | 100
2836  from_collapse_limit       | 8
2837  join_collapse_limit       | 8
2838  cpu_index_tuple_cost      | 0.005
2839  cpu_operator_cost         | 0.0025
2840  cpu_tuple_cost            | 0.01
2841  effective_cache_size      | 16384
2842  random_page_cost          | 4
2843  seq_page_cost             | 1
2844  enable_bitmapscan         | on
2845  enable_hashagg            | on
2846  enable_hashjoin           | on
2847  enable_indexscan          | on
2848  enable_material           | on
2849  enable_mergejoin          | on
2850  enable_nestloop           | on
2851  enable_seqscan            | on
2852  enable_sort               | on
2853  enable_tidscan            | on
2854  client_min_messages       | log
2855 (29 rows)
2856
2857 -- No. A-12-1-4
2858 -- No. A-12-2-4
2859 SELECT name, setting FROM settings;
2860            name            |  setting  
2861 ---------------------------+-----------
2862  geqo                      | on
2863  geqo_effort               | 5
2864  geqo_generations          | 0
2865  geqo_pool_size            | 0
2866  geqo_seed                 | 0
2867  geqo_selection_bias       | 2
2868  geqo_threshold            | 12
2869  constraint_exclusion      | partition
2870  cursor_tuple_fraction     | 0.1
2871  default_statistics_target | 100
2872  from_collapse_limit       | 8
2873  join_collapse_limit       | 8
2874  cpu_index_tuple_cost      | 0.005
2875  cpu_operator_cost         | 0.0025
2876  cpu_tuple_cost            | 0.01
2877  effective_cache_size      | 16384
2878  random_page_cost          | 4
2879  seq_page_cost             | 1
2880  enable_bitmapscan         | on
2881  enable_hashagg            | on
2882  enable_hashjoin           | on
2883  enable_indexscan          | on
2884  enable_material           | on
2885  enable_mergejoin          | on
2886  enable_nestloop           | on
2887  enable_seqscan            | on
2888  enable_sort               | on
2889  enable_tidscan            | on
2890  client_min_messages       | log
2891 (29 rows)
2892
2893 SET pg_hint_plan.parse_messages TO error;
2894 EXPLAIN (COSTS false) EXECUTE p2;
2895 ERROR:  prepared statement "p2" does not exist
2896 EXPLAIN (COSTS false) EXECUTE p1;
2897               QUERY PLAN              
2898 --------------------------------------
2899  Merge Join
2900    Merge Cond: (t1.c1 = t2.c1)
2901    ->  Sort
2902          Sort Key: t1.c1
2903          ->  Seq Scan on t1
2904    ->  Index Scan using t2_pkey on t2
2905 (6 rows)
2906
2907 SELECT name, setting FROM settings;
2908            name            |  setting  
2909 ---------------------------+-----------
2910  geqo                      | on
2911  geqo_effort               | 5
2912  geqo_generations          | 0
2913  geqo_pool_size            | 0
2914  geqo_seed                 | 0
2915  geqo_selection_bias       | 2
2916  geqo_threshold            | 12
2917  constraint_exclusion      | partition
2918  cursor_tuple_fraction     | 0.1
2919  default_statistics_target | 100
2920  from_collapse_limit       | 8
2921  join_collapse_limit       | 8
2922  cpu_index_tuple_cost      | 0.005
2923  cpu_operator_cost         | 0.0025
2924  cpu_tuple_cost            | 0.01
2925  effective_cache_size      | 16384
2926  random_page_cost          | 4
2927  seq_page_cost             | 1
2928  enable_bitmapscan         | on
2929  enable_hashagg            | on
2930  enable_hashjoin           | on
2931  enable_indexscan          | on
2932  enable_material           | on
2933  enable_mergejoin          | on
2934  enable_nestloop           | on
2935  enable_seqscan            | on
2936  enable_sort               | on
2937  enable_tidscan            | on
2938  client_min_messages       | log
2939 (29 rows)
2940
2941 DEALLOCATE p1;
2942 SET pg_hint_plan.parse_messages TO LOG;
2943 ----
2944 ---- No. A-12-3 effective range of the hint
2945 ----
2946 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2947               QUERY PLAN              
2948 --------------------------------------
2949  Merge Join
2950    Merge Cond: (t1.c1 = t2.c1)
2951    ->  Index Scan using t1_pkey on t1
2952    ->  Sort
2953          Sort Key: t2.c1
2954          ->  Seq Scan on t2
2955 (6 rows)
2956
2957 -- No. A-12-3-1
2958 SET enable_indexscan TO off;
2959 SET enable_mergejoin TO off;
2960 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
2961           QUERY PLAN          
2962 ------------------------------
2963  Hash Join
2964    Hash Cond: (t1.c1 = t2.c1)
2965    ->  Seq Scan on t1
2966    ->  Hash
2967          ->  Seq Scan on t2
2968 (5 rows)
2969
2970 SELECT name, setting FROM settings;
2971            name            |  setting  
2972 ---------------------------+-----------
2973  geqo                      | on
2974  geqo_effort               | 5
2975  geqo_generations          | 0
2976  geqo_pool_size            | 0
2977  geqo_seed                 | 0
2978  geqo_selection_bias       | 2
2979  geqo_threshold            | 12
2980  constraint_exclusion      | partition
2981  cursor_tuple_fraction     | 0.1
2982  default_statistics_target | 100
2983  from_collapse_limit       | 8
2984  join_collapse_limit       | 8
2985  cpu_index_tuple_cost      | 0.005
2986  cpu_operator_cost         | 0.0025
2987  cpu_tuple_cost            | 0.01
2988  effective_cache_size      | 16384
2989  random_page_cost          | 4
2990  seq_page_cost             | 1
2991  enable_bitmapscan         | on
2992  enable_hashagg            | on
2993  enable_hashjoin           | on
2994  enable_indexscan          | off
2995  enable_material           | on
2996  enable_mergejoin          | off
2997  enable_nestloop           | on
2998  enable_seqscan            | on
2999  enable_sort               | on
3000  enable_tidscan            | on
3001  client_min_messages       | log
3002 (29 rows)
3003
3004 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3005 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3006 LOG:  pg_hint_plan:
3007 used hint:
3008 IndexScan(t2)
3009 MergeJoin(t1 t2)
3010 Leading(t2 t1)
3011 Set(enable_indexscan on)
3012 Set(geqo_threshold 100)
3013 not used hint:
3014 duplication hint:
3015 error hint:
3016
3017               QUERY PLAN              
3018 --------------------------------------
3019  Merge Join
3020    Merge Cond: (t1.c1 = t2.c1)
3021    ->  Index Scan using t1_pkey on t1
3022    ->  Index Scan using t2_pkey on t2
3023 (4 rows)
3024
3025 SELECT name, setting FROM settings;
3026            name            |  setting  
3027 ---------------------------+-----------
3028  geqo                      | on
3029  geqo_effort               | 5
3030  geqo_generations          | 0
3031  geqo_pool_size            | 0
3032  geqo_seed                 | 0
3033  geqo_selection_bias       | 2
3034  geqo_threshold            | 12
3035  constraint_exclusion      | partition
3036  cursor_tuple_fraction     | 0.1
3037  default_statistics_target | 100
3038  from_collapse_limit       | 8
3039  join_collapse_limit       | 8
3040  cpu_index_tuple_cost      | 0.005
3041  cpu_operator_cost         | 0.0025
3042  cpu_tuple_cost            | 0.01
3043  effective_cache_size      | 16384
3044  random_page_cost          | 4
3045  seq_page_cost             | 1
3046  enable_bitmapscan         | on
3047  enable_hashagg            | on
3048  enable_hashjoin           | on
3049  enable_indexscan          | off
3050  enable_material           | on
3051  enable_mergejoin          | off
3052  enable_nestloop           | on
3053  enable_seqscan            | on
3054  enable_sort               | on
3055  enable_tidscan            | on
3056  client_min_messages       | log
3057 (29 rows)
3058
3059 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3060           QUERY PLAN          
3061 ------------------------------
3062  Hash Join
3063    Hash Cond: (t1.c1 = t2.c1)
3064    ->  Seq Scan on t1
3065    ->  Hash
3066          ->  Seq Scan on t2
3067 (5 rows)
3068
3069 -- No. A-12-3-2
3070 SET enable_indexscan TO off;
3071 SET enable_mergejoin TO off;
3072 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3073           QUERY PLAN          
3074 ------------------------------
3075  Hash Join
3076    Hash Cond: (t1.c1 = t2.c1)
3077    ->  Seq Scan on t1
3078    ->  Hash
3079          ->  Seq Scan on t2
3080 (5 rows)
3081
3082 SELECT name, setting FROM settings;
3083            name            |  setting  
3084 ---------------------------+-----------
3085  geqo                      | on
3086  geqo_effort               | 5
3087  geqo_generations          | 0
3088  geqo_pool_size            | 0
3089  geqo_seed                 | 0
3090  geqo_selection_bias       | 2
3091  geqo_threshold            | 12
3092  constraint_exclusion      | partition
3093  cursor_tuple_fraction     | 0.1
3094  default_statistics_target | 100
3095  from_collapse_limit       | 8
3096  join_collapse_limit       | 8
3097  cpu_index_tuple_cost      | 0.005
3098  cpu_operator_cost         | 0.0025
3099  cpu_tuple_cost            | 0.01
3100  effective_cache_size      | 16384
3101  random_page_cost          | 4
3102  seq_page_cost             | 1
3103  enable_bitmapscan         | on
3104  enable_hashagg            | on
3105  enable_hashjoin           | on
3106  enable_indexscan          | off
3107  enable_material           | on
3108  enable_mergejoin          | off
3109  enable_nestloop           | on
3110  enable_seqscan            | on
3111  enable_sort               | on
3112  enable_tidscan            | on
3113  client_min_messages       | log
3114 (29 rows)
3115
3116 BEGIN;
3117 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3118 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3119 LOG:  pg_hint_plan:
3120 used hint:
3121 IndexScan(t2)
3122 MergeJoin(t1 t2)
3123 Leading(t2 t1)
3124 Set(enable_indexscan on)
3125 Set(geqo_threshold 100)
3126 not used hint:
3127 duplication hint:
3128 error hint:
3129
3130               QUERY PLAN              
3131 --------------------------------------
3132  Merge Join
3133    Merge Cond: (t1.c1 = t2.c1)
3134    ->  Index Scan using t1_pkey on t1
3135    ->  Index Scan using t2_pkey on t2
3136 (4 rows)
3137
3138 COMMIT;
3139 BEGIN;
3140 SELECT name, setting FROM settings;
3141            name            |  setting  
3142 ---------------------------+-----------
3143  geqo                      | on
3144  geqo_effort               | 5
3145  geqo_generations          | 0
3146  geqo_pool_size            | 0
3147  geqo_seed                 | 0
3148  geqo_selection_bias       | 2
3149  geqo_threshold            | 12
3150  constraint_exclusion      | partition
3151  cursor_tuple_fraction     | 0.1
3152  default_statistics_target | 100
3153  from_collapse_limit       | 8
3154  join_collapse_limit       | 8
3155  cpu_index_tuple_cost      | 0.005
3156  cpu_operator_cost         | 0.0025
3157  cpu_tuple_cost            | 0.01
3158  effective_cache_size      | 16384
3159  random_page_cost          | 4
3160  seq_page_cost             | 1
3161  enable_bitmapscan         | on
3162  enable_hashagg            | on
3163  enable_hashjoin           | on
3164  enable_indexscan          | off
3165  enable_material           | on
3166  enable_mergejoin          | off
3167  enable_nestloop           | on
3168  enable_seqscan            | on
3169  enable_sort               | on
3170  enable_tidscan            | on
3171  client_min_messages       | log
3172 (29 rows)
3173
3174 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3175           QUERY PLAN          
3176 ------------------------------
3177  Hash Join
3178    Hash Cond: (t1.c1 = t2.c1)
3179    ->  Seq Scan on t1
3180    ->  Hash
3181          ->  Seq Scan on t2
3182 (5 rows)
3183
3184 COMMIT;
3185 -- No. A-12-3-3
3186 SET enable_indexscan TO off;
3187 SET enable_mergejoin TO off;
3188 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3189           QUERY PLAN          
3190 ------------------------------
3191  Hash Join
3192    Hash Cond: (t1.c1 = t2.c1)
3193    ->  Seq Scan on t1
3194    ->  Hash
3195          ->  Seq Scan on t2
3196 (5 rows)
3197
3198 SELECT name, setting FROM settings;
3199            name            |  setting  
3200 ---------------------------+-----------
3201  geqo                      | on
3202  geqo_effort               | 5
3203  geqo_generations          | 0
3204  geqo_pool_size            | 0
3205  geqo_seed                 | 0
3206  geqo_selection_bias       | 2
3207  geqo_threshold            | 12
3208  constraint_exclusion      | partition
3209  cursor_tuple_fraction     | 0.1
3210  default_statistics_target | 100
3211  from_collapse_limit       | 8
3212  join_collapse_limit       | 8
3213  cpu_index_tuple_cost      | 0.005
3214  cpu_operator_cost         | 0.0025
3215  cpu_tuple_cost            | 0.01
3216  effective_cache_size      | 16384
3217  random_page_cost          | 4
3218  seq_page_cost             | 1
3219  enable_bitmapscan         | on
3220  enable_hashagg            | on
3221  enable_hashjoin           | on
3222  enable_indexscan          | off
3223  enable_material           | on
3224  enable_mergejoin          | off
3225  enable_nestloop           | on
3226  enable_seqscan            | on
3227  enable_sort               | on
3228  enable_tidscan            | on
3229  client_min_messages       | log
3230 (29 rows)
3231
3232 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3233 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3234 LOG:  pg_hint_plan:
3235 used hint:
3236 IndexScan(t2)
3237 MergeJoin(t1 t2)
3238 Leading(t2 t1)
3239 Set(enable_indexscan on)
3240 Set(geqo_threshold 100)
3241 not used hint:
3242 duplication hint:
3243 error hint:
3244
3245               QUERY PLAN              
3246 --------------------------------------
3247  Merge Join
3248    Merge Cond: (t1.c1 = t2.c1)
3249    ->  Index Scan using t1_pkey on t1
3250    ->  Index Scan using t2_pkey on t2
3251 (4 rows)
3252
3253 \connect
3254 LOAD 'pg_hint_plan';
3255 SELECT name, setting FROM settings;
3256            name            |  setting  
3257 ---------------------------+-----------
3258  geqo                      | on
3259  geqo_effort               | 5
3260  geqo_generations          | 0
3261  geqo_pool_size            | 0
3262  geqo_seed                 | 0
3263  geqo_selection_bias       | 2
3264  geqo_threshold            | 12
3265  constraint_exclusion      | partition
3266  cursor_tuple_fraction     | 0.1
3267  default_statistics_target | 100
3268  from_collapse_limit       | 8
3269  join_collapse_limit       | 8
3270  cpu_index_tuple_cost      | 0.005
3271  cpu_operator_cost         | 0.0025
3272  cpu_tuple_cost            | 0.01
3273  effective_cache_size      | 16384
3274  random_page_cost          | 4
3275  seq_page_cost             | 1
3276  enable_bitmapscan         | on
3277  enable_hashagg            | on
3278  enable_hashjoin           | on
3279  enable_indexscan          | on
3280  enable_material           | on
3281  enable_mergejoin          | on
3282  enable_nestloop           | on
3283  enable_seqscan            | on
3284  enable_sort               | on
3285  enable_tidscan            | on
3286  client_min_messages       | notice
3287 (29 rows)
3288
3289 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3290               QUERY PLAN              
3291 --------------------------------------
3292  Merge Join
3293    Merge Cond: (t1.c1 = t2.c1)
3294    ->  Index Scan using t1_pkey on t1
3295    ->  Sort
3296          Sort Key: t2.c1
3297          ->  Seq Scan on t2
3298 (6 rows)
3299
3300 SET pg_hint_plan.enable TO on;
3301 SET pg_hint_plan.debug_print TO on;
3302 SET client_min_messages TO LOG;
3303 SET search_path TO public;