Accept plan changes in updatable_views test
authorTomas Vondra <[email protected]>
Tue, 17 Oct 2017 20:01:27 +0000 (22:01 +0200)
committerTomas Vondra <[email protected]>
Thu, 19 Oct 2017 12:12:03 +0000 (14:12 +0200)
After getting rid of the extra targetlist entries in 2d29155679, the
plan changes in updatable_views seem reasonable so accept them.

src/test/regress/expected/updatable_views.out

index 8a2c2b08797dc826a459bd70202e6b98c029ef14..3797dd2b7d1a3598f265b60bb4d38a2ff0f9653a 100644 (file)
@@ -2083,8 +2083,8 @@ SELECT * FROM v1 WHERE a=8;
 
 EXPLAIN (VERBOSE, COSTS OFF)
 UPDATE v1 SET a=100 WHERE snoop(a) AND leakproof(a) AND a < 7 AND a != 6;
-                                                              QUERY PLAN                                                              
---------------------------------------------------------------------------------------------------------------------------------------
+                                          QUERY PLAN                                           
+-----------------------------------------------------------------------------------------------
  Remote Subquery Scan on any (datanode_1,datanode_2)
    ->  Update on public.t1
          Update on public.t1
@@ -2094,32 +2094,27 @@ UPDATE v1 SET a=100 WHERE snoop(a) AND leakproof(a) AND a < 7 AND a != 6;
          ->  Index Scan using t1_a_idx on public.t1
                Output: 100, t1.b, t1.c, t1.ctid
                Index Cond: ((t1.a > 5) AND (t1.a < 7))
-               Filter: ((t1.a <> 6) AND (alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t1.a) AND leakproof(t1.a))
+               Filter: ((t1.a <> 6) AND (SubPlan 1) AND snoop(t1.a) AND leakproof(t1.a))
                SubPlan 1
-                 ->  Append
-                       ->  Seq Scan on public.t12 t12_1
-                             Filter: (t12_1.a = t1.a)
-                       ->  Seq Scan on public.t111 t111_1
-                             Filter: (t111_1.a = t1.a)
-               SubPlan 2
-                 ->  Append
-                       ->  Seq Scan on public.t12 t12_2
-                             Output: t12_2.a
-                       ->  Seq Scan on public.t111 t111_2
-                             Output: t111_2.a
+                 ->  Remote Subquery Scan on all (datanode_1)
+                       ->  Append
+                             ->  Seq Scan on public.t12 t12_1
+                                   Filter: (t12_1.a = t1.a)
+                             ->  Seq Scan on public.t111 t111_1
+                                   Filter: (t111_1.a = t1.a)
          ->  Index Scan using t11_a_idx on public.t11
                Output: 100, t11.b, t11.c, t11.d, t11.ctid
                Index Cond: ((t11.a > 5) AND (t11.a < 7))
-               Filter: ((t11.a <> 6) AND (alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t11.a) AND leakproof(t11.a))
+               Filter: ((t11.a <> 6) AND (SubPlan 1) AND snoop(t11.a) AND leakproof(t11.a))
          ->  Index Scan using t12_a_idx on public.t12
                Output: 100, t12.b, t12.c, t12.e, t12.ctid
                Index Cond: ((t12.a > 5) AND (t12.a < 7))
-               Filter: ((t12.a <> 6) AND (alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t12.a) AND leakproof(t12.a))
+               Filter: ((t12.a <> 6) AND (SubPlan 1) AND snoop(t12.a) AND leakproof(t12.a))
          ->  Index Scan using t111_a_idx on public.t111
                Output: 100, t111.b, t111.c, t111.d, t111.e, t111.ctid
                Index Cond: ((t111.a > 5) AND (t111.a < 7))
-               Filter: ((t111.a <> 6) AND (alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t111.a) AND leakproof(t111.a))
-(33 rows)
+               Filter: ((t111.a <> 6) AND (SubPlan 1) AND snoop(t111.a) AND leakproof(t111.a))
+(29 rows)
 
 UPDATE v1 SET a=100 WHERE snoop(a) AND leakproof(a) AND a < 7 AND a != 6;
 SELECT * FROM v1 WHERE a=100; -- Nothing should have been changed to 100
@@ -2134,8 +2129,8 @@ SELECT * FROM t1 WHERE a=100; -- Nothing should have been changed to 100
 
 EXPLAIN (VERBOSE, COSTS OFF)
 UPDATE v1 SET a=a+1 WHERE snoop(a) AND leakproof(a) AND a = 8;
-                                                          QUERY PLAN                                                           
--------------------------------------------------------------------------------------------------------------------------------
+                                  QUERY PLAN                                   
+-------------------------------------------------------------------------------
  Remote Subquery Scan on any (datanode_1,datanode_2)
    ->  Update on public.t1
          Update on public.t1
@@ -2145,32 +2140,27 @@ UPDATE v1 SET a=a+1 WHERE snoop(a) AND leakproof(a) AND a = 8;
          ->  Index Scan using t1_a_idx on public.t1
                Output: (t1.a + 1), t1.b, t1.c, t1.ctid
                Index Cond: ((t1.a > 5) AND (t1.a = 8))
-               Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t1.a) AND leakproof(t1.a))
+               Filter: ((SubPlan 1) AND snoop(t1.a) AND leakproof(t1.a))
                SubPlan 1
-                 ->  Append
-                       ->  Seq Scan on public.t12 t12_1
-                             Filter: (t12_1.a = t1.a)
-                       ->  Seq Scan on public.t111 t111_1
-                             Filter: (t111_1.a = t1.a)
-               SubPlan 2
-                 ->  Append
-                       ->  Seq Scan on public.t12 t12_2
-                             Output: t12_2.a
-                       ->  Seq Scan on public.t111 t111_2
-                             Output: t111_2.a
+                 ->  Remote Subquery Scan on all (datanode_1)
+                       ->  Append
+                             ->  Seq Scan on public.t12 t12_1
+                                   Filter: (t12_1.a = t1.a)
+                             ->  Seq Scan on public.t111 t111_1
+                                   Filter: (t111_1.a = t1.a)
          ->  Index Scan using t11_a_idx on public.t11
                Output: (t11.a + 1), t11.b, t11.c, t11.d, t11.ctid
                Index Cond: ((t11.a > 5) AND (t11.a = 8))
-               Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t11.a) AND leakproof(t11.a))
+               Filter: ((SubPlan 1) AND snoop(t11.a) AND leakproof(t11.a))
          ->  Index Scan using t12_a_idx on public.t12
                Output: (t12.a + 1), t12.b, t12.c, t12.e, t12.ctid
                Index Cond: ((t12.a > 5) AND (t12.a = 8))
-               Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t12.a) AND leakproof(t12.a))
+               Filter: ((SubPlan 1) AND snoop(t12.a) AND leakproof(t12.a))
          ->  Index Scan using t111_a_idx on public.t111
                Output: (t111.a + 1), t111.b, t111.c, t111.d, t111.e, t111.ctid
                Index Cond: ((t111.a > 5) AND (t111.a = 8))
-               Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) AND snoop(t111.a) AND leakproof(t111.a))
-(33 rows)
+               Filter: ((SubPlan 1) AND snoop(t111.a) AND leakproof(t111.a))
+(29 rows)
 
 UPDATE v1 SET a=a+1 WHERE snoop(a) AND leakproof(a) AND a = 8;
 SELECT * FROM v1 WHERE b=8;