Ruby on rails PostgreSQL特定错误,报告为闪烁

Ruby on rails PostgreSQL特定错误,报告为闪烁,ruby-on-rails,postgresql,Ruby On Rails,Postgresql,我很难在PostgreSQL上工作(它在SQLite上工作得很好) 下面是一个示例错误: >> Annotation.creations_report ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: ` character varying LINE 1: ... grouping = E'day' AND aggregation = E'count' AND `condition...

我很难在PostgreSQL上工作(它在SQLite上工作得很好)

下面是一个示例错误:

>> Annotation.creations_report
ActiveRecord::StatementInvalid: PGError: ERROR:  operator does not exist: ` character varying
LINE 1: ... grouping = E'day' AND aggregation = E'count' AND `condition...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT * FROM "reports_as_sparkline_cache" WHERE (model_name = E'Annotation' AND report_name = E'creations' AND grouping = E'day' AND aggregation = E'count' AND `condition` = E'' AND reporting_period >= '2009-11-22')  ORDER BY reporting_period ASC LIMIT 100

想法?

去掉反勾“,使用单引号”。在SQL中,只允许使用单引号和双引号,单引号表示值,双引号表示数据库对象,如表名、列名等

SELECT * FROM "reports_as_sparkline_cache" WHERE (model_name = E'Annotation' AND report_name = E'creations' AND grouping = E'day' AND aggregation = E'count' AND condition = E'' AND reporting_period >= '2009-11-22')  ORDER BY reporting_period ASC LIMIT 100