Fix 'union' test case.
authorPavan Deolasee <pavan.deolasee@gmail.com>
Wed, 26 Jul 2017 05:13:24 +0000 (10:43 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Wed, 26 Jul 2017 05:13:24 +0000 (10:43 +0530)
Since 93cbab90b0c6fc3fc4aa515b93057127c0ee8a1b we expect that the child table
has columns at the same position as the parent table. So fix the test case to
follow the rule and resolve expected output differences arising from that.

The test case should pass with this change.

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

index 05e13db310984939d92869fa9af2f1d931232dac..e159c8b64b9a1ec2eedab8f4f8a62cab773bb4a0 100644 (file)
@@ -538,10 +538,10 @@ explain (num_nodes off, nodes off, costs off)
 -- Test that ORDER BY for UNION ALL can be pushed down to inheritance
 -- children.
 --
-CREATE TEMP TABLE t1c (b text, a text);
+CREATE TEMP TABLE t1c (a text, b text);
 ALTER TABLE t1c INHERIT t1;
 CREATE TEMP TABLE t2c (primary key (ab)) INHERITS (t2);
-INSERT INTO t1c VALUES ('v', 'w'), ('c', 'd'), ('m', 'n'), ('e', 'f');
+INSERT INTO t1c (b, a)  VALUES ('v', 'w'), ('c', 'd'), ('m', 'n'), ('e', 'f');
 INSERT INTO t2c VALUES ('vw'), ('cd'), ('mn'), ('ef');
 CREATE INDEX t1c_ab_idx on t1c ((a || b));
 set enable_seqscan = on;
index f0f76408696da13f0e6726d073619162eb0fc8cb..d71375b8976dfa18987a6f9456cf2f333e55f909 100644 (file)
@@ -212,10 +212,10 @@ explain (num_nodes off, nodes off, costs off)
 -- children.
 --
 
-CREATE TEMP TABLE t1c (b text, a text);
+CREATE TEMP TABLE t1c (a text, b text);
 ALTER TABLE t1c INHERIT t1;
 CREATE TEMP TABLE t2c (primary key (ab)) INHERITS (t2);
-INSERT INTO t1c VALUES ('v', 'w'), ('c', 'd'), ('m', 'n'), ('e', 'f');
+INSERT INTO t1c (b, a)  VALUES ('v', 'w'), ('c', 'd'), ('m', 'n'), ('e', 'f');
 INSERT INTO t2c VALUES ('vw'), ('cd'), ('mn'), ('ef');
 CREATE INDEX t1c_ab_idx on t1c ((a || b));