【发布时间】:2013-05-04 10:42:11
【问题描述】:
我已经安装了带有 PostGis 的 PostgreSQL,我尝试运行以下命令:
SELECT N1.edname AS "Borders Royal Exchange A"
FROM eds_census2011 N1, eds_census2011 N2
WHERE Touch(N1.the_geom, N2.the_geom)
AND N2 = 'Royal Exchange A'
我收到一个错误(如下)我需要向 Postgres 添加什么或启用什么吗?
ERROR: function touch(geometry, geometry) does not exist LINE 3: WHERE Touch(N1.the_geom, N2.the_geom) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ********** Error ********** ERROR: function touch(geometry, geometry) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. Character: 96
【问题讨论】:
-
AND N2 = 'eds_census2011'看起来也很可疑(您不能将表(别名)与字符串常量进行比较) -
抱歉,我输入的时候打错了,应该是:Royal Exchange A。这不是我得到的错误
-
你真的有一个名为
N2的列,就像表别名一样?那么你应该对它进行表限定!否则这仍然是句法废话:AND N2 = 'Royal Exchange A'
标签: sql function postgresql postgis spatial