Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql PostgresSQL:间隔字段值超出范围_Postgresql - Fatal编程技术网

Postgresql PostgresSQL:间隔字段值超出范围

Postgresql PostgresSQL:间隔字段值超出范围,postgresql,Postgresql,我是PostgresSQL的新手,在那里我运行一个查询,在那里我查找上周内的活动,但它抛出了超出范围的错误 Postgres SQL: select * from myTable where order_time > '2018-12-04 18:22:26' - INTERVAL '7 day' 错误: IntervalFieldOverflow: ERROR: interval field value out of range: "2018-12-04 18:22:26" 版本:

我是PostgresSQL的新手,在那里我运行一个查询,在那里我查找上周内的活动,但它抛出了超出范围的错误

Postgres SQL:

select *
from myTable
where order_time > '2018-12-04 18:22:26' - INTERVAL '7 day'
错误:

IntervalFieldOverflow: ERROR:  interval field value out of range: "2018-12-04 18:22:26"
版本:
Postgressql9.6


我试图通过在线搜索解决问题,但没有得到太多帮助。

尝试转换时间戳文字字符串:

select *
from myTable
where order_time > '2018-12-04 18:22:26'::timestamp - interval '7 day';