0

アプリケーションに問題があります。開発環境では機能しますが、顧客サーバーでは機能しません。

タイムスタンプ付きのgenerate_seriesは機能しません。同じ関数ですが、整数で機能します。

エラーメッセージ:

 [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で関数が見つかりません。これらのメソッドのコピーはどこで入手できるので、可能であればインストールできます。

4

2 に答える 2

2

PostgreSQLのバージョンについては言及していませんが、

generate_series(timestamp, timestamp, interval)

8.4より前には利用できませんでした

それで、多分あなたは古いバージョンを使用していますか?

于 2012-04-03T13:01:54.203 に答える
1

timestamp最初の2つの関数パラメーターとして値を渡す必要があります。またはそれらをキャストします:

generate_series('2011-12-31'::timestamp, '2012-12-31'::timestamp, '1 day')
于 2012-04-03T13:00:43.063 に答える