當在Heroku(postgres)上將Rails 3應用程序投入生產時,本地(sqlite)代碼正常工作時出現錯誤 - 我在查看Postgres手冊時看到no果:Sqlite到Postgres(Heroku)日期/時間
我的代碼:
(strftime('%s','now') - strftime('%s', posts.created_at)
錯誤:
LINE 1: SELECT posts.*, ((strftime('%s','now') -...
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
這是一個Rails應用程序,所以'created_at'應該是'timestamp'。 – 2011-04-06 16:34:15