Java generate_series()函数缺少PostgreSQL
我的申请有点问题。它可以在我的开发环境中工作,但不能在我的客户服务器上工作 带有时间戳的generate_序列不起作用。相同的函数,但使用整数工作 错误消息:Java generate_series()函数缺少PostgreSQL,java,hibernate,postgresql,generate-series,Java,Hibernate,Postgresql,Generate Series,我的申请有点问题。它可以在我的开发环境中工作,但不能在我的客户服务器上工作 带有时间戳的generate_序列不起作用。相同的函数,但使用整数工作 错误消息: [Request processing failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query] with root c
[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.
我在PostgreSQL中找不到该函数。在哪里可以获得这些方法的副本,以便在可能的情况下安装它们 必须将
时间戳
值作为前两个函数参数传递。或投下:
generate_series('2011-12-31'::timestamp, '2012-12-31'::timestamp, '1 day')
必须将
时间戳
值作为前两个函数参数传递。或投下:
generate_series('2011-12-31'::timestamp, '2012-12-31'::timestamp, '1 day')
您没有提到您的PostgreSQL版本,但是
generate_series(timestamp, timestamp, interval)
在8.4之前不可用
所以,也许您使用的是过时的版本?您没有提到您的PostgreSQL版本,但是
generate_series(timestamp, timestamp, interval)
在8.4之前不可用
那么,也许你使用的是过时的版本?哦,天哪。。我得检查一下是的!旧版本。谢谢你的帮助@heldt在8.4之前的版本中,可以使用旧函数签名复制新功能。把如何做的问题贴出来。哦,天哪。。我得检查一下是的!旧版本。谢谢你的帮助@heldt在8.4之前的版本中,可以使用旧函数签名复制新功能。只需发布关于如何做的问题。