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
-- 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
-- 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;