generate_series()函数缺少PostgreSQL [英] generate_series() function missing PostgreSQL

查看:606
本文介绍了generate_series()函数缺少PostgreSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序遇到了一些麻烦。它适用于我的开发环境,但不适用于我的客户服务器。



具有时间戳的generate_series不起作用。

错误消息:

  [请求处理失败;嵌套异常是javax.persistence.PersistenceException:org.hibernate.exception.SQLGrammarException:无法执行具有根本原因的查询] 
org.postgresql.util.PSQLException:ERROR:function generate_series(unknown,unknown,interval)not存在
提示:没有函数匹配给定的名称和参数类型。您可能需要添加显式类型转换。

我无法在PostgreSQL中找到这个函数。我在哪里可以得到这些方法的副本,以便我可以安装它们。

解决方案

您没有提及您的PostgreSQL版本,但是

 generate_series(timestamp,timestamp,interval)

8.4

因此,也许您正在使用过时的版本?


I'm having some trouble with my application. It works in my development environment but not on my customers server..

The generate_series with timestamps does not work. The same function but with integers work.

Error message:

 [Request processing failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query] with root cause
    org.postgresql.util.PSQLException: ERROR: function generate_series(unknown, unknown, interval) does not exist
      Hint: No function matches the given name and argument types. You might need to add explicit type casts.

I can't locate the function in PostgreSQL. Where can I get a copy of these methods so I can install them if possible.

解决方案

You don't mention your PostgreSQL version, but

generate_series(timestamp, timestamp, interval)

was not available before 8.4

So maybe you are using an outdated version?

这篇关于generate_series()函数缺少PostgreSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆