简体   繁体   English

运算符不存在:带有时区的tstzrange &&时间戳

[英]Operator does not exist: tstzrange && timestamp with time zone

Running: 正在运行:

SELECT tstzrange( '2019-05-01', '2019-05-09' ) && '2019-05-01'::timestamptz

I get error message: 我收到错误消息:

SQL Error [42883]: ERROR: operator does not exist: tstzrange && timestamp with time zone
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.

Why there is no range overlap with a point? 为什么没有与点的范围重叠?
This operation looks reasonable 这个操作看起来很合理

Why there is no range overlap with a point? 为什么没有与点的范围重叠?

Because this is not how "overlaps" is defined. 因为这不是定义“重叠”的方式。 If you want to test if a single timestamp value falls into a range, you need to use the contains operator @> 如果要测试单个时间戳值是否在范围内,则需要使用contains运算符@>

SELECT tstzrange( '2019-05-01', '2019-05-09' ) @> '2019-05-01'::timestamptz

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运算符不存在:@timestamp without time zone - operator does not exist: @ timestamp without time zone PostgreSQL:运算符不存在:没有时区的时间戳==没有时区的时间戳 - PostgreSQL: operator does not exist: timestamp without time zone == timestamp without time zone PostgreSQL:42883 运算符不存在:没有时区的时间戳 = 文本 - PostgreSQL: 42883 Operator does not exist: timestamp without time zone = text 错误:运算符不存在:没有时区的时间戳 > 整数) - ERROR: operator does not exist: timestamp without time zone > integer) 运算符不存在:没有时区的时间戳~~ *未知的Ruby代码 - operator does not exist: timestamp without time zone ~~* unknown ruby code 错误:运算符不存在:没有时区的时间戳+整数 - ERROR: operator does not exist: timestamp without time zone + integer PostgreSQL:42883运算符不存在:没有时区的时间戳 - PostgreSQL: 42883 Operator does not exist: timestamp without time zone 错误:运营商不存在:带时区的时间戳/integer - ERROR: operator does not exist: timestamp with time zone / integer Spring 数据 jpa PostgreSql:运算符不存在:没有时区的时间戳 >= bytea - Spring data jpa PostgreSql: operator does not exist: timestamp without time zone >= bytea 按日期获取查询 - 错误:运算符不存在:没有时区的时间戳~~未知 - Getting query by date - ERROR: operator does not exist: timestamp without time zone ~~ unknown
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM