当我尝试使用psql中的h命令时
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');为什么它走错了路,我怎样才能解决这个问题?
发布于 2012-09-13 19:44:05
安装软件只是第一步。您还必须在您想要的数据库中启用它。对于PostGIS 2,在数据库中要执行空间操作,运行
CREATE EXTENSION postgis;作为超级用户。魔法应该会发生。
https://stackoverflow.com/questions/12407323
复制相似问题