OSDN Git Service

8月21日の試験の初期処理に影響して変化した予想結果を正しく修正した。
authorMitsuru Hasegawa <hasegawa@metrosystems.co.jp>
Wed, 22 Aug 2012 00:47:45 +0000 (09:47 +0900)
committerMitsuru Hasegawa <hasegawa@metrosystems.co.jp>
Wed, 22 Aug 2012 00:47:45 +0000 (09:47 +0900)
バグNo.6の修正に伴う予想結果の変化を反映した。

expected/ut-A.out
expected/ut-L.out
expected/ut-S.out

index deecafa..2e11e9d 100644 (file)
@@ -19,11 +19,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -49,45 +49,45 @@ error hint:
 -- No. A-5-1-2
 /* +SeqScan(t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-1-3
 --+SeqScan(t1)
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-1-4
 --+SeqScan(t1)
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-1-5
 -- +SeqScan(t1)
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-1-6
 --SeqScan(t1)
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -97,27 +97,27 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
 INFO:  hint syntax error at or near "/* nest comment */ */
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
 DETAIL:  Block comments nest doesn't supported.
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-1-8
 /* +SeqScan(t1) /* nest comment */ */
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-1-9
 /*SeqScan(t1) /* nest comment */ */
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -144,17 +144,17 @@ error hint:
 /* normal comment */
 /*+SeqScan(t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 -- No. A-5-2-3
 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -162,9 +162,9 @@ EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
 ---- No. A-5-4 hint delimiter
 ----
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -925,9 +925,9 @@ error hint:
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
 INFO:  hint syntax error at or near "))"
 DETAIL:  Relation name is necessary.
-             QUERY PLAN             
-------------------------------------
- Index Scan using t1_pkey on t1 ")"
+            QUERY PLAN            
+----------------------------------
+ Index Scan using t1_i1 on t1 ")"
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -967,9 +967,9 @@ error hint:
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
 INFO:  hint syntax error at or near ""
 DETAIL:  Unterminated quoted relation name.
-             QUERY PLAN              
--------------------------------------
- Index Scan using t1_pkey on t1 """"
+            QUERY PLAN             
+-----------------------------------
+ Index Scan using t1_i1 on t1 """"
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1009,9 +1009,9 @@ error hint:
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
 INFO:  hint syntax error at or near ")"
 DETAIL:  Relation name is necessary.
-             QUERY PLAN             
-------------------------------------
- Index Scan using t1_pkey on t1 " "
+            QUERY PLAN            
+----------------------------------
+ Index Scan using t1_i1 on t1 " "
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1051,9 +1051,9 @@ error hint:
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "    " WHERE "       ".c1 = 1;
 INFO:  hint syntax error at or near ")"
 DETAIL:  Relation name is necessary.
-                QUERY PLAN                 
--------------------------------------------
- Index Scan using t1_pkey on t1 "        "
+            QUERY PLAN             
+-----------------------------------
+ Index Scan using t1_i1 on t1 "  "
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1096,9 +1096,9 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
 ".c1 = 1;
 INFO:  hint syntax error at or near ")"
 DETAIL:  Relation name is necessary.
-            QUERY PLAN            
-----------------------------------
- Index Scan using t1_pkey on t1 "
+           QUERY PLAN           
+--------------------------------
+ Index Scan using t1_i1 on t1 "
  "
    Index Cond: (c1 = 1)
 (3 rows)
@@ -1269,9 +1269,9 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
 INFO:  hint syntax error at or near "/**/)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
 DETAIL:  Block comments nest doesn't supported.
-              QUERY PLAN               
----------------------------------------
- Index Scan using t1_pkey on t1 "/**/"
+             QUERY PLAN              
+-------------------------------------
+ Index Scan using t1_i1 on t1 "/**/"
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1280,9 +1280,9 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1
 INFO:  hint syntax error at or near "/**//**//**/)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
 DETAIL:  Block comments nest doesn't supported.
-                  QUERY PLAN                   
------------------------------------------------
- Index Scan using t1_pkey on t1 "/**//**//**/"
+                 QUERY PLAN                  
+---------------------------------------------
+ Index Scan using t1_i1 on t1 "/**//**//**/"
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1300,7 +1300,7 @@ Set/**/あ".c1 = 1;"
 DETAIL:  Block comments nest doesn't supported.
                 QUERY PLAN                
 ------------------------------------------
- Index Scan using t1_pkey on t1 "tT()""  
+ Index Scan using t1_i1 on t1 "tT()""    
  Set/**/あ"
    Index Cond: (c1 = 1)
 (3 rows)
@@ -1341,11 +1341,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1361,11 +1361,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1381,11 +1381,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1401,11 +1401,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1421,11 +1421,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1441,11 +1441,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1455,9 +1455,9 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
 INFO:  hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
 DETAIL:  Block comments nest doesn't supported.
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1603,11 +1603,11 @@ SHOW pg_hint_plan.enable;
 
 /*+Set(enable_indexscan off)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1621,9 +1621,9 @@ SHOW pg_hint_plan.enable;
 
 /*+Set(enable_indexscan off)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -1637,11 +1637,11 @@ SHOW pg_hint_plan.enable;
 
 /*+Set(enable_indexscan off)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1674,11 +1674,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1692,11 +1692,11 @@ SHOW pg_hint_plan.debug_print;
 
 /*+Set(enable_indexscan off)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -1710,11 +1710,11 @@ SHOW pg_hint_plan.debug_print;
 
 /*+Set(enable_indexscan off)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (4 rows)
 
@@ -2152,9 +2152,9 @@ SeqScan(no_table)
 duplication hint:
 error hint:
 
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -2179,12 +2179,12 @@ duplication hint:
 TidScan(t1)
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 = 1)
    Filter: (ctid = '(1,1)'::tid)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 = 1)
 (5 rows)
 
@@ -2205,7 +2205,7 @@ error hint:
 
            QUERY PLAN            
 ---------------------------------
- Index Scan using t1_pkey on t1
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
    Filter: (ctid = '(1,1)'::tid)
 (3 rows)
@@ -2245,9 +2245,9 @@ duplication hint:
 error hint:
 Set(enable_indexscan enable)
 
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -2256,9 +2256,9 @@ Set(enable_indexscan enable)
 ----
 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
 EXPLAIN (COSTS false) EXECUTE p1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -2319,11 +2319,11 @@ error hint:
 
 /*+SeqScan(t1)*/
 EXPLAIN (COSTS false) EXECUTE p1 (1);
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 < $1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 < $1)
 (4 rows)
 
@@ -2337,11 +2337,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 < $1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 < $1)
 (4 rows)
 
@@ -2390,11 +2390,11 @@ duplication hint:
 error hint:
 
 EXPLAIN (COSTS false) EXECUTE p1 (1);
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 < $1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 < $1)
 (4 rows)
 
@@ -2407,11 +2407,11 @@ not used hint:
 duplication hint:
 error hint:
 
-             QUERY PLAN             
-------------------------------------
+            QUERY PLAN            
+----------------------------------
  Bitmap Heap Scan on t1
    Recheck Cond: (c1 < $1)
-   ->  Bitmap Index Scan on t1_pkey
+   ->  Bitmap Index Scan on t1_i1
          Index Cond: (c1 < $1)
 (4 rows)
 
@@ -2421,18 +2421,18 @@ DEALLOCATE p1;
 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
 /*+BitmapScan(t1)*/
 EXPLAIN (COSTS false) EXECUTE p1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
 /*+BitmapScan(t1)*/
 EXPLAIN (COSTS false) EXECUTE p1;
-           QUERY PLAN           
---------------------------------
- Index Scan using t1_pkey on t1
+          QUERY PLAN          
+------------------------------
+ Index Scan using t1_i1 on t1
    Index Cond: (c1 = 1)
 (2 rows)
 
@@ -2529,11 +2529,11 @@ SELECT s.query, s.calls
 ---- No. A-12-2 reset of global variable of original at the error
 ----
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -2555,14 +2555,14 @@ error hint:
 NestLoop(t1 t1)
 
 EXPLAIN (COSTS false) EXECUTE p1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Sort
          Sort Key: t1.c1
          ->  Seq Scan on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t2_i1 on t2
 (6 rows)
 
 -- No. A-12-1-1
@@ -2652,14 +2652,14 @@ not used hint:
 duplication hint:
 error hint:
 
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Sort
          Sort Key: t1.c1
          ->  Seq Scan on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t2_i1 on t2
 (6 rows)
 
 -- No. A-12-1-2
@@ -2738,14 +2738,14 @@ SELECT name, setting FROM settings;
 (29 rows)
 
 EXPLAIN (COSTS false) EXECUTE p1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Sort
          Sort Key: t1.c1
          ->  Seq Scan on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t2_i1 on t2
 (6 rows)
 
 -- No. A-12-1-3
@@ -2799,25 +2799,25 @@ not used hint:
 duplication hint:
 error hint:
 
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Sort
          Sort Key: t1.c1
          ->  Seq Scan on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t2_i1 on t2
 (6 rows)
 
 EXPLAIN (COSTS false) EXECUTE p1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Sort
          Sort Key: t1.c1
          ->  Seq Scan on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t2_i1 on t2
 (6 rows)
 
 SELECT name, setting FROM settings;
@@ -2894,14 +2894,14 @@ SET pg_hint_plan.parse_messages TO error;
 EXPLAIN (COSTS false) EXECUTE p2;
 ERROR:  prepared statement "p2" does not exist
 EXPLAIN (COSTS false) EXECUTE p1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Sort
          Sort Key: t1.c1
          ->  Seq Scan on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t2_i1 on t2
 (6 rows)
 
 SELECT name, setting FROM settings;
@@ -2944,11 +2944,11 @@ SET pg_hint_plan.parse_messages TO LOG;
 ---- No. A-12-3 effective range of the hint
 ----
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -3014,12 +3014,12 @@ not used hint:
 duplication hint:
 error hint:
 
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t1_i1 on t1
+   ->  Index Scan using t2_i1 on t2
 (4 rows)
 
 SELECT name, setting FROM settings;
@@ -3127,12 +3127,12 @@ not used hint:
 duplication hint:
 error hint:
 
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t1_i1 on t1
+   ->  Index Scan using t2_i1 on t2
 (4 rows)
 
 COMMIT;
@@ -3242,12 +3242,12 @@ not used hint:
 duplication hint:
 error hint:
 
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
-   ->  Index Scan using t2_pkey on t2
+   ->  Index Scan using t1_i1 on t1
+   ->  Index Scan using t2_i1 on t2
 (4 rows)
 
 \connect
@@ -3287,11 +3287,11 @@ SELECT name, setting FROM settings;
 (29 rows)
 
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-              QUERY PLAN              
---------------------------------------
+             QUERY PLAN             
+------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
index 463c23d..c9dda1b 100644 (file)
@@ -4,17 +4,17 @@ SET pg_hint_plan.debug_print TO on;
 SET client_min_messages TO LOG;
 SET search_path TO public;
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Merge Join
          Merge Cond: (t1.c1 = t4.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t4_pkey on t4
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t4_i1 on t4
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -37,7 +37,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -61,17 +61,17 @@ Leading(t4 t2 t3 t1)
 duplication hint:
 error hint:
 
-                      QUERY PLAN                      
-------------------------------------------------------
+                     QUERY PLAN                     
+----------------------------------------------------
  Merge Join
    Merge Cond: (t_1.c1 = t_2.c1)
    ->  Merge Join
          Merge Cond: (t_1.c1 = t_4.c1)
          ->  Merge Join
                Merge Cond: (t_1.c1 = t_3.c1)
-               ->  Index Scan using t1_pkey on t1 t_1
-               ->  Index Scan using t3_pkey on t3 t_3
-         ->  Index Scan using t4_pkey on t4 t_4
+               ->  Index Scan using t1_i1 on t1 t_1
+               ->  Index Scan using t3_i1 on t3 t_3
+         ->  Index Scan using t4_i1 on t4 t_4
    ->  Sort
          Sort Key: t_2.c1
          ->  Seq Scan on t2 t_2
@@ -91,7 +91,7 @@ error hint:
 --------------------------------------------------------
  Merge Join
    Merge Cond: (t_1.c1 = t_2.c1)
-   ->  Index Scan using t1_pkey on t1 t_1
+   ->  Index Scan using t1_i1 on t1 t_1
    ->  Sort
          Sort Key: t_2.c1
          ->  Hash Join
@@ -122,7 +122,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -146,17 +146,17 @@ Leading(s1.t4 s1.t2 s1.t3 s1.t1)
 duplication hint:
 error hint:
 
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Merge Join
          Merge Cond: (t1.c1 = t4.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t4_pkey on t4
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t4_i1 on t4
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -179,7 +179,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -208,7 +208,7 @@ error hint:
  Nested Loop
    ->  Merge Join
          Merge Cond: (t1.c1 = t2.c1)
-         ->  Index Scan using t1_pkey on t1
+         ->  Index Scan using t1_i1 on t1
          ->  Sort
                Sort Key: t2.c1
                ->  Hash Join
@@ -216,7 +216,7 @@ error hint:
                      ->  Seq Scan on t3
                      ->  Hash
                            ->  Seq Scan on t2
-   ->  Index Scan using t4_pkey on t4
+   ->  Index Scan using t4_i1 on t4
          Index Cond: (c1 = t1.c1)
 (13 rows)
 
@@ -237,7 +237,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -253,17 +253,17 @@ error hint:
 
 -- No. L-1-4-2
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 WHERE s1.t1.c1 = t2.c1 AND s1.t1.c1 = t3.c1 AND s1.t1.c1 = s2.t1.c1;
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (s1.t1.c1 = s2.t1.c1)
    ->  Merge Join
          Merge Cond: (s1.t1.c1 = t2.c1)
          ->  Merge Join
                Merge Cond: (s1.t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t2_pkey on t2
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t2_i1 on t2
    ->  Sort
          Sort Key: s2.t1.c1
          ->  Seq Scan on t1
@@ -280,17 +280,17 @@ Leading(t1 t2 t3 t1)
 duplication hint:
 error hint:
 
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (s1.t1.c1 = s2.t1.c1)
    ->  Merge Join
          Merge Cond: (s1.t1.c1 = t2.c1)
          ->  Merge Join
                Merge Cond: (s1.t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t2_pkey on t2
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t2_i1 on t2
    ->  Sort
          Sort Key: s2.t1.c1
          ->  Seq Scan on t1
@@ -305,34 +305,34 @@ not used hint:
 duplication hint:
 error hint:
 
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Nested Loop
    ->  Nested Loop
          ->  Merge Join
                Merge Cond: (t3.c1 = t2.c1)
-               ->  Index Scan using t3_pkey on t3
+               ->  Index Scan using t3_i1 on t3
                ->  Sort
                      Sort Key: t2.c1
                      ->  Seq Scan on t2
          ->  Index Scan using t1_pkey on t1
                Index Cond: (c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
          Index Cond: (c1 = t2.c1)
 (12 rows)
 
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 s2t1 WHERE s1.t1.c1 = t2.c1 AND s1.t1.c1 = t3.c1 AND s1.t1.c1 = s2t1.c1;
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = s2t1.c1)
    ->  Merge Join
          Merge Cond: (t1.c1 = t2.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t2_pkey on t2
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t2_i1 on t2
    ->  Sort
          Sort Key: s2t1.c1
          ->  Seq Scan on t1 s2t1
@@ -355,9 +355,9 @@ error hint:
          Merge Cond: (t1.c1 = t3.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = s2t1.c1)
-               ->  Index Scan using t1_pkey on t1
+               ->  Index Scan using t1_i1 on t1
                ->  Index Scan using t1_pkey on t1 s2t1
-         ->  Index Scan using t3_pkey on t3
+         ->  Index Scan using t3_i1 on t3
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -365,8 +365,8 @@ error hint:
 
 -- No. L-1-4-3
 EXPLAIN (COSTS false) SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1) FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
-                           QUERY PLAN                           
-----------------------------------------------------------------
+                          QUERY PLAN                           
+---------------------------------------------------------------
  Merge Join
    Merge Cond: (s1.t1.c1 = s1.t2.c1)
    InitPlan 1 (returns $0)
@@ -377,9 +377,9 @@ EXPLAIN (COSTS false) SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2, s1.t3, s1.
                        Merge Cond: (s1.t1.c1 = s1.t4.c1)
                        ->  Merge Join
                              Merge Cond: (s1.t1.c1 = s1.t3.c1)
-                             ->  Index Scan using t1_pkey on t1
-                             ->  Index Scan using t3_pkey on t3
-                       ->  Index Scan using t4_pkey on t4
+                             ->  Index Scan using t1_i1 on t1
+                             ->  Index Scan using t3_i1 on t3
+                       ->  Index Scan using t4_i1 on t4
                  ->  Sort
                        Sort Key: s1.t2.c1
                        ->  Seq Scan on t2
@@ -387,9 +387,9 @@ EXPLAIN (COSTS false) SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2, s1.t3, s1.
          Merge Cond: (s1.t1.c1 = s1.t4.c1)
          ->  Merge Join
                Merge Cond: (s1.t1.c1 = s1.t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t4_pkey on t4
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t4_i1 on t4
    ->  Sort
          Sort Key: s1.t2.c1
          ->  Seq Scan on t2
@@ -412,7 +412,7 @@ error hint:
      ->  Aggregate
            ->  Merge Join
                  Merge Cond: (s1.t1.c1 = s1.t2.c1)
-                 ->  Index Scan using t1_pkey on t1
+                 ->  Index Scan using t1_i1 on t1
                  ->  Sort
                        Sort Key: s1.t2.c1
                        ->  Hash Join
@@ -424,7 +424,7 @@ error hint:
                                          ->  Seq Scan on t4
                                          ->  Hash
                                                ->  Seq Scan on t2
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: s1.t2.c1
          ->  Hash Join
@@ -451,7 +451,7 @@ error hint:
 --------------------------------------------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -496,7 +496,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -524,7 +524,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -549,17 +549,17 @@ duplication hint:
 error hint:
 Leading(t4 t2 t3 t4)
 
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Merge Join
          Merge Cond: (t1.c1 = t4.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t4_pkey on t4
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t4_i1 on t4
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -579,7 +579,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -604,17 +604,17 @@ duplication hint:
 error hint:
 Leading(t4 t2 t2 t4)
 
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Merge Join
          Merge Cond: (t1.c1 = t4.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t4_pkey on t4
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t4_i1 on t4
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -637,7 +637,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
@@ -1126,17 +1126,17 @@ error hint:
 
 -- No. L-1-6-11
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, (SELECT t4.c1 FROM s1.t4) st4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = st4.c1;
-                    QUERY PLAN                    
---------------------------------------------------
+                   QUERY PLAN                   
+------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
    ->  Merge Join
          Merge Cond: (t1.c1 = t4.c1)
          ->  Merge Join
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_pkey on t1
-               ->  Index Scan using t3_pkey on t3
-         ->  Index Scan using t4_pkey on t4
+               ->  Index Scan using t1_i1 on t1
+               ->  Index Scan using t3_i1 on t3
+         ->  Index Scan using t4_i1 on t4
    ->  Sort
          Sort Key: t2.c1
          ->  Seq Scan on t2
@@ -1156,7 +1156,7 @@ error hint:
  Nested Loop
    ->  Merge Join
          Merge Cond: (t1.c1 = t2.c1)
-         ->  Index Scan using t1_pkey on t1
+         ->  Index Scan using t1_i1 on t1
          ->  Sort
                Sort Key: t2.c1
                ->  Hash Join
@@ -1164,7 +1164,7 @@ error hint:
                      ->  Seq Scan on t3
                      ->  Hash
                            ->  Seq Scan on t2
-   ->  Index Scan using t4_pkey on t4
+   ->  Index Scan using t4_i1 on t4
          Index Cond: (c1 = t1.c1)
 (13 rows)
 
@@ -1181,7 +1181,7 @@ error hint:
 ------------------------------------------------------
  Merge Join
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_pkey on t1
+   ->  Index Scan using t1_i1 on t1
    ->  Sort
          Sort Key: t2.c1
          ->  Hash Join
index 398428e..05855d0 100644 (file)
@@ -3747,15 +3747,15 @@ not used hint:
 duplication hint:
 error hint:
 
-                     QUERY PLAN                     
-----------------------------------------------------
+                      QUERY PLAN                       
+-------------------------------------------------------
  Result
    ->  Append
          ->  Index Scan using p2_pkey on p2
                Index Cond: (c1 = 1)
-         ->  Index Scan using p2c1_i on p2c1 p2
+         ->  Index Scan using p2c1_pkey on p2c1 p2
                Index Cond: (c1 = 1)
-         ->  Index Scan using p2c1c1_i on p2c1c1 p2
+         ->  Index Scan using p2c1c1_pkey on p2c1c1 p2
                Index Cond: (c1 = 1)
 (8 rows)
 
@@ -3769,16 +3769,16 @@ not used hint:
 duplication hint:
 error hint:
 
-                                      QUERY PLAN                                       
----------------------------------------------------------------------------------------
- Result  (cost=0.00..24.80 rows=3 width=34)
-   ->  Append  (cost=0.00..24.80 rows=3 width=34)
-         ->  Index Scan using p2_pkey on p2  (cost=0.00..8.27 rows=1 width=44)
-               Index Cond: (c1 = 1)
-         ->  Index Scan using p2c1_i on p2c1 p2  (cost=0.00..8.27 rows=1 width=44)
-               Index Cond: (c1 = 1)
-         ->  Index Scan using p2c1c1_i on p2c1c1 p2  (cost=0.00..8.27 rows=1 width=14)
+                                        QUERY PLAN                                        
+------------------------------------------------------------------------------------------
+ Result  (cost=10000000000.00..20000000009.89 rows=3 width=34)
+   ->  Append  (cost=10000000000.00..20000000009.89 rows=3 width=34)
+         ->  Seq Scan on p2  (cost=10000000000.00..10000000000.00 rows=1 width=44)
+               Filter: (c1 = 1)
+         ->  Index Scan using p2c1_pkey on p2c1 p2  (cost=0.00..8.27 rows=1 width=44)
                Index Cond: (c1 = 1)
+         ->  Seq Scan on p2c1c1 p2  (cost=10000000000.00..10000000001.62 rows=1 width=14)
+               Filter: (c1 = 1)
 (8 rows)
 
 ----