summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2017-06-30 10:10:21 +0000
committerPavan Deolasee2017-06-30 10:10:21 +0000
commit42bbbf4b165de49a25bdfd44f7a6fdcd143f57c7 (patch)
tree17dfc531ebdb993180abaa25d3e07bc954af1c87
parent169136fc444ea743a32fde4e19a55c05b12f3bd5 (diff)
Add ORDER BY and accept expected output changes for the testcase 'interval'
An ORDER BY was necessary to get consistent results. Other than that, a Remote Subplan node is added to the explain plan output.
-rw-r--r--src/test/regress/expected/interval.out19
-rw-r--r--src/test/regress/sql/interval.sql2
2 files changed, 11 insertions, 10 deletions
diff --git a/src/test/regress/expected/interval.out b/src/test/regress/expected/interval.out
index 38d0c5b85e..a921b5d0c7 100644
--- a/src/test/regress/expected/interval.out
+++ b/src/test/regress/expected/interval.out
@@ -254,10 +254,11 @@ CREATE INDEX ON INTERVAL_TBL_OF USING btree (f1);
SET enable_seqscan TO false;
EXPLAIN (COSTS OFF)
SELECT f1 FROM INTERVAL_TBL_OF r1 ORDER BY f1;
- QUERY PLAN
---------------------------------------------------------------------
- Index Only Scan using interval_tbl_of_f1_idx on interval_tbl_of r1
-(1 row)
+ QUERY PLAN
+--------------------------------------------------------------------------
+ Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Index Only Scan using interval_tbl_of_f1_idx on interval_tbl_of r1
+(2 rows)
SELECT f1 FROM INTERVAL_TBL_OF r1 ORDER BY f1;
f1
@@ -749,19 +750,19 @@ SELECT interval '1 2:03:04.5678' minute to second(2);
-- test casting to restricted precision (bug #14479)
SELECT f1, f1::INTERVAL DAY TO MINUTE AS "minutes",
(f1 + INTERVAL '1 month')::INTERVAL MONTH::INTERVAL YEAR AS "years"
- FROM interval_tbl;
+ FROM interval_tbl ORDER BY f1;
f1 | minutes | years
-----------------+-----------------+----------
+ -00:00:14 | 00:00:00 | 00:00:00
00:01:00 | 00:01:00 | 00:00:00
05:00:00 | 05:00:00 | 00:00:00
+ 1 day 02:03:04 | 1 day 02:03:00 | 00:00:00
10 days | 10 days | 00:00:00
- 34 years | 34 years | 34 years
3 mons | 3 mons | 00:00:00
- -00:00:14 | 00:00:00 | 00:00:00
- 1 day 02:03:04 | 1 day 02:03:00 | 00:00:00
- 6 years | 6 years | 6 years
5 mons | 5 mons | 00:00:00
5 mons 12:00:00 | 5 mons 12:00:00 | 00:00:00
+ 6 years | 6 years | 6 years
+ 34 years | 34 years | 34 years
(10 rows)
-- test inputting and outputting SQL standard interval literals
diff --git a/src/test/regress/sql/interval.sql b/src/test/regress/sql/interval.sql
index 501087f39f..688b2ef982 100644
--- a/src/test/regress/sql/interval.sql
+++ b/src/test/regress/sql/interval.sql
@@ -226,7 +226,7 @@ SELECT interval '1 2:03:04.5678' minute to second(2);
-- test casting to restricted precision (bug #14479)
SELECT f1, f1::INTERVAL DAY TO MINUTE AS "minutes",
(f1 + INTERVAL '1 month')::INTERVAL MONTH::INTERVAL YEAR AS "years"
- FROM interval_tbl;
+ FROM interval_tbl ORDER BY f1;
-- test inputting and outputting SQL standard interval literals
SET IntervalStyle TO sql_standard;