OSDN Git Service

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