PostgreSQL中没有OVERLAPS
运算符。
regress=> SELECT daterange(DATE '2014-04-01', DATE '2014-04-28') OVERLAPS daterange(DATE '2014-04-14', DATE '2018-01-01');
ERROR: syntax error at or near "OVERLAPS"
LINE 1: ...T daterange(DATE '2014-04-01', DATE '2014-04-28') OVERLAPS d...
我不知道你从哪里得到的。你真的在使用 PostgreSQL,还是一些第三方分支?您是在阅读 PostgreSQL 文档,还是阅读其他数据库产品的教程/文档?
我想你想要PostgreSQL 用户手册推荐的,&&
运营商:
regress=> SELECT daterange(DATE '2014-04-01', DATE '2014-04-28') && daterange(DATE '2014-04-14', DATE '2018-01-01');
?column?
----------
t
(1 row)