]> granicus.if.org Git - postgresql/commitdiff
Add COSTS off to two EXPLAIN using tests.
authorAndres Freund <andres@anarazel.de>
Tue, 13 Mar 2018 06:09:58 +0000 (23:09 -0700)
committerAndres Freund <andres@anarazel.de>
Tue, 13 Mar 2018 23:12:31 +0000 (16:12 -0700)
Discussion: https://postgr.es/m/20180312222023.i4sgkbl4oqtstus3@alap3.anarazel.de

src/test/regress/expected/subselect.out
src/test/regress/sql/subselect.sql

index 3b2bf3273e88501ec66e4ab06b11732504ecc5be..2904ae43e55f5b6067c6275cf9e4dd18c684d385 100644 (file)
@@ -232,23 +232,23 @@ SELECT *, pg_typeof(f1) FROM
 (3 rows)
 
 -- ... unless there's context to suggest differently
-explain verbose select '42' union all select '43';
-                   QUERY PLAN                    
--------------------------------------------------
- Append  (cost=0.00..0.05 rows=2 width=32)
-   ->  Result  (cost=0.00..0.01 rows=1 width=32)
+explain (verbose, costs off) select '42' union all select '43';
+         QUERY PLAN         
+----------------------------
+ Append
+   ->  Result
          Output: '42'::text
-   ->  Result  (cost=0.00..0.01 rows=1 width=32)
+   ->  Result
          Output: '43'::text
 (5 rows)
 
-explain verbose select '42' union all select 43;
-                   QUERY PLAN                   
-------------------------------------------------
- Append  (cost=0.00..0.05 rows=2 width=4)
-   ->  Result  (cost=0.00..0.01 rows=1 width=4)
+explain (verbose, costs off) select '42' union all select 43;
+     QUERY PLAN     
+--------------------
+ Append
+   ->  Result
          Output: 42
-   ->  Result  (cost=0.00..0.01 rows=1 width=4)
+   ->  Result
          Output: 43
 (5 rows)
 
index 0100367b8d76595bc1ee1f83605346632003fab8..9b7125c111cb2a3453b6b2cfbfe07a6715ccc669 100644 (file)
@@ -99,8 +99,8 @@ SELECT *, pg_typeof(f1) FROM
 
 -- ... unless there's context to suggest differently
 
-explain verbose select '42' union all select '43';
-explain verbose select '42' union all select 43;
+explain (verbose, costs off) select '42' union all select '43';
+explain (verbose, costs off) select '42' union all select 43;
 
 -- check materialization of an initplan reference (bug #14524)
 explain (verbose, costs off)