当我尝试以下命令时psql
:
select PostGIS_full_version();
我得到错误:
ERROR: function postgis_full_version() does not exist
LINE 1: select PostGIS_full_version();
^
HINT: No function matches the given name and argument types.
You might need to add explicit type casts.
我安装了 PostGIS 2,yum list postgis*
Installed Packages
postgis2_91.i686 2.0.1-1.rhel6 @pgdg91
postgis2_91-devel.i686 2.0.1-1.rhel6 @pgdg91
Available Packages
postgis.i686 1.5.3-1.el6 epel
postgis-docs.i686 1.5.3-1.el6 epel
postgis-jdbc.i686 1.5.3-1.el6 epel
postgis-utils.i686 1.5.3-1.el6 epel
postgis2_91-debuginfo.i686 2.0.1-1.rhel6 pgdg91
postgis2_91-docs.i686 2.0.1-1.rhel6 pgdg91
postgis2_91-utils.i686 2.0.1-1.rhel6 pgdg91
postgis91.i686 1.5.5-1.rhel6 pgdg91
postgis91-debuginfo.i686 1.5.5-1.rhel6 pgdg91
postgis91-docs.i686 1.5.5-1.rhel6 pgdg91
postgis91-utils.i686 1.5.5-1.rhel6 pgdg91
为什么命令select PostGIS_full_version();
不起作用?
我尝试了上述方法,因为使用 PostgreSQL 和 PostGIS 的脚本在查找 PostGIS 时遇到问题。它搜索
/usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
来自该行
pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/postgis.sql');
为什么它会走错路,我该如何解决?