Postgresql 如何按子句对sql范围查询进行分组
我在建立索引时收到一个错误。我最近切换到PostgreSQL,我正在使用Navicat。错误来自具有邮政编码、城市、州、纬度和经度的Locations表Postgresql 如何按子句对sql范围查询进行分组,postgresql,navicat,Postgresql,Navicat,我在建立索引时收到一个错误。我最近切换到PostgreSQL,我正在使用Navicat。错误来自具有邮政编码、城市、州、纬度和经度的Locations表 indexing index 'location_core'... collected 84068 docs, 0.7 MB sorted 0.1 Mhits, 100.0% done total 84068 docs, 716268 bytes total 0.686 sec, 1043676 bytes/sec, 122495.78 doc
indexing index 'location_core'...
collected 84068 docs, 0.7 MB
sorted 0.1 Mhits, 100.0% done
total 84068 docs, 716268 bytes
total 0.686 sec, 1043676 bytes/sec, 122495.78 docs/sec
indexing index 'user_core'...
ERROR: index 'user_core': sql_range_query: ERROR: column "locations.latitude" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...sers"."updated_at")::int AS "updated_at", RADIANS(locations....
^
(DSN=pgsql://lexi87:***@localhost:5432/dating_development).
total 0 docs, 0 bytes
total 0.007 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'user_delta'...
ERROR: index 'user_delta': sql_range_query: ERROR: column "locations.latitude" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...sers"."updated_at")::int AS "updated_at", RADIANS(locations....
我怎样才能准确地将它们放在一个GROUPBY子句中?任何帮助都将不胜感激 到底是哪个操作导致了错误?你在干什么?该错误是非法SQL查询的典型错误。可能查询是由Navicat生成的,软件有问题。我正在重新构建sphinx,所以出现错误的时候。我编辑了这篇文章。