【发布时间】:2014-10-31 09:38:05
【问题描述】:
我试图使用如下查询从 mover_location 表中获取最近的人:
select * from mover_location where
public.st_dwithin(public.st_geogfromtext('SRID=4326;POINT(11.2565999 75.7711587)'),
last_seen_location_geog, 1060)
这不起作用并给我如下错误:
ERROR: function _st_expand(public.geography, double precision) does not exist
我没有调用 st_expand 函数,我该如何解决这个问题,或者还有其他的吗
解决方法?谢谢。
我的mover_location表结构如下,这里last_seen_location_geog是geography类型的
更新:-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, true)
CONTEXT: SQL function "st_dwithin" during inlining
【问题讨论】:
-
您使用的是什么版本的 Postgis?这是相关的,因为 ST_DWithin 函数有多种形式,它们是在不同版本中引入的,并非所有形式都支持地理数据类型,其中一种在内部使用 ST_Expand。
-
你是如何安装 PostGIS 的?
-
我安装了 Enterprise db 完整包,包括 pgadminIII、postgis 和 stackbuilder ,我不知道 postgis 的确切版本,但它安装为 postgresql 9.3 版
-
PostGIS Shapefile Import/Export Manager 2.1.3
标签: php function postgresql postgis