[英]PostgreSQL Parameter error (timestamp with time zone, timestamp without time zone)
[英]PostgreSQL error function width_bucket(timestamp with time zone, timestamp without time zone[]) does not exist
已经解决了问题 - 在这里发帖是因为在我翻译了这篇中文博客文章之前,我一直没有找到解决方案。
ERROR: function width_bucket(timestamp without time zone, timestamp with time zone[]) does not exist
LINE 3: width_bucket(
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
或者
Error: Failed to prepare query: ERROR: function width_bucket(timestamp with time zone, timestamp without time zone[]) does not exist
LINE 3: width_bucket(
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
解决方案是在系列生成器中指定时区(即下面的with time zone
):
select generate_series(
timestamp with time zone '2020-10-02 13:43:00',
'2020-10-17 16:15:00',
'12 hours'))
.. 或者实际上without time zone
是匹配您与系列合并的数据。 使用select pg_typeof(timecolumn) from table limit 1;
报告您的数据是否名义上使用时区。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.