首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >pgAdmin III:错误:函数postgis_full_version()不存在

pgAdmin III:错误:函数postgis_full_version()不存在
EN

Ask Ubuntu用户
提问于 2011-05-15 01:57:53
回答 2查看 7.7K关注 0票数 2

我在跑纳蒂:

试图让pgAdmin III运行。所以我去了pgAdmin Ubuntu下载部分..。但没有看到纳蒂的指示。

所以我下载了Natty .deb来自Launchpad的pgAdmin III

这激发了Ubuntu的软件中心。我安装了。一切正常。

我打开了pgAdmin III并成功地连接到本地postGIS数据库。

现在!我遵循文本PostGIS in Action,它告诉我要执行:

代码语言:javascript
运行
复制
SELECT postgis_full_version();

这当然会产生错误,如标题所示:

代码语言:javascript
运行
复制
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.

********** Error **********

SQL state: 42883
Character: 8

Update:此外,我在phpPgAdmin中运行了确切的查询并得到:

代码语言:javascript
运行
复制
SQL error:

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.

In statement:
SELECT postgis_full_version();

这就是为什么我把它放在Ubuntu中的原因--来自phpPgAdmin和pgAdmin III的类似结果表明,这不是各自GUI的问题,而是rather...the操作系统的问题?

搜索谷歌,似乎找不到任何相关的..。

提前谢谢。

EN

回答 2

Ask Ubuntu用户

回答已采纳

发布于 2011-05-15 21:28:56

虽然可能是一种复杂的方法,但使用上述方法确实正确地安装了pgadmin。我发现了问题..。必须在已启用postgis_full_version()的数据库上调用PostGIS ()函数。

要在数据库上启用PostGIS,必须通过命令行在数据库上执行postgis.sql和spatial_ref_sys.sql查询,方法是导航到<postgis>/<version>/contrib目录并执行:

代码语言:javascript
运行
复制
psql -d <db_name> -f postgis.sql 

代码语言:javascript
运行
复制
psql -d <db_name> -f spatial_ref_sys.sql

如果您似乎无法找到这些文件,则始终可以转到根目录并使用locate命令:

代码语言:javascript
运行
复制
cd /
locate postgis.sql
票数 4
EN

Ask Ubuntu用户

发布于 2011-05-15 03:04:59

不需要经历那么多麻烦,因为PgAdmin III是宇宙下为纳蒂包装

  1. 取消注释/etc/apt/Sourcees.list中的宇宙源
  2. 运行:apt-获取更新apt-get安装pgadmin3
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/42852

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档