PostgreSQL 范围类型中的“无穷大”是什么意思?infinity
将or指定-infinity
为界限或之间有什么区别NULL
吗?即是infinity
指定范围界限是无限的显式形式,而NULL
隐式指定无限界限范围?
请参阅以下示例:
SELECT tstzrange('-infinity','infinity') && tstzrange(NULL, NULL);
?column?
----------
t
SELECT tstzrange('2013-01-01 00:00:00+01', '2013-02-01 00:00:00+01')
&& tstzrange(NULL, '2013-03-01 00:00:00+01');
?column?
----------
t
SELECT tstzrange('2013-01-01 00:00:00+01', '2013-02-01 00:00:00+01')
&& tstzrange('-infinity', '2013-03-01 00:00:00+01');
?column?
----------
t