summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra2017-07-07 18:10:07 +0000
committerTomas Vondra2017-07-07 18:10:07 +0000
commit4d9575a627e520d52e1e3237a4749e3f4207dd05 (patch)
treecf395b499a657e4922befbb6f92ff3cf581c0231
parent30fdab504c1842f0eda2763326d388d5dbac8a8d (diff)
Stabilize order of results in insert regresion test
Same issue as in c2392efc83, but in different regression test. Fixed the same way, i.e. by adding ORDER BY clauses to stabilize the order.
-rw-r--r--src/test/regress/expected/insert.out8
-rw-r--r--src/test/regress/sql/insert.sql4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out
index 58b345f50a..a8b5fb63a6 100644
--- a/src/test/regress/expected/insert.out
+++ b/src/test/regress/expected/insert.out
@@ -251,7 +251,7 @@ insert into range_parted values ('b', 10);
insert into range_parted values ('a');
ERROR: no partition of relation "range_parted" found for row
DETAIL: Partition key of the failing row contains (a, (b + 0)) = (a, null).
-select tableoid::regclass, * from range_parted;
+select tableoid::regclass, * from range_parted order by 1, 2, 3;
tableoid | a | b
----------+---+----
part1 | a | 1
@@ -476,17 +476,17 @@ insert into mcrparted4 values (30, 21, 20); -- error
ERROR: new row for relation "mcrparted4" violates partition constraint
DETAIL: Failing row contains (30, 21, 20).
-- check rows
-select tableoid::regclass::text, * from mcrparted order by 1;
+select tableoid::regclass::text, * from mcrparted order by 1, 2, 3, 4;
tableoid | a | b | c
------------+----+------+------
mcrparted0 | 0 | 1 | 1
mcrparted0 | 0 | 1 | 1
+ mcrparted1 | 2 | 1 | 0
+ mcrparted1 | 2 | 1 | 0
mcrparted1 | 9 | 1000 | 1
mcrparted1 | 9 | 1000 | 1
mcrparted1 | 10 | 5 | -1
mcrparted1 | 10 | 5 | -1
- mcrparted1 | 2 | 1 | 0
- mcrparted1 | 2 | 1 | 0
mcrparted2 | 10 | 6 | 1000
mcrparted2 | 10 | 6 | 1000
mcrparted2 | 10 | 1000 | 1000
diff --git a/src/test/regress/sql/insert.sql b/src/test/regress/sql/insert.sql
index 80e1da4be7..12d6b3dc8e 100644
--- a/src/test/regress/sql/insert.sql
+++ b/src/test/regress/sql/insert.sql
@@ -154,7 +154,7 @@ insert into range_parted values ('b', 1);
insert into range_parted values ('b', 10);
-- fail (partition key (b+0) is null)
insert into range_parted values ('a');
-select tableoid::regclass, * from range_parted;
+select tableoid::regclass, * from range_parted order by 1, 2, 3;
-- ok
insert into list_parted values (null, 1);
@@ -328,7 +328,7 @@ insert into mcrparted5 values (30, 21, 20);
insert into mcrparted4 values (30, 21, 20); -- error
-- check rows
-select tableoid::regclass::text, * from mcrparted order by 1;
+select tableoid::regclass::text, * from mcrparted order by 1, 2, 3, 4;
-- cleanup
drop table mcrparted;