Nyx*_*nyx 1 postgresql postgis centos postgresql-9.1
当我尝试以下命令时psql:
select PostGIS_full_version();
Run Code Online (Sandbox Code Playgroud)
我收到错误:
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.
Run Code Online (Sandbox Code Playgroud)
我安装了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
Run Code Online (Sandbox Code Playgroud)
为什么命令select PostGIS_full_version();不起作用?
我尝试了上述操作,因为使用PostgreSQL和PostGIS的脚本在查找PostGIS时遇到了问题.它搜索
/usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
Run Code Online (Sandbox Code Playgroud)
来自这条线
pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/postgis.sql');
Run Code Online (Sandbox Code Playgroud)
为什么它走错路,我该如何解决这个问题呢?
小智 9
安装软件只是第一步.您还必须在所需的数据库中启用它.对于PostGIS 2,要在数据库中执行空间操作,请运行
CREATE EXTENSION postgis;
Run Code Online (Sandbox Code Playgroud)
作为超级用户.魔术应该发生.
| 归档时间: |
|
| 查看次数: |
1297 次 |
| 最近记录: |