gpt4 book ai didi

postgresql - 函数makepoint postgresql 9.1错误postgis

转载 作者:行者123 更新时间:2023-11-29 14:21:34 26 4
gpt4 key购买 nike

将 postgres 8.4 迁移到 9.1 并将我的项目移动到新服务器时出现此错误

ERROR: function makepoint(unknown, unknown) does not exist LINE 4: distance_sphere(makepoint('14.2995419','41.0310868'),mak... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

谷歌搜索我看到这可能是 postgis 的问题......然后我遵循了本指南 http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS20Ubuntu1204src我在服务器上安装了所有东西......

什么都不管用……而且我有变疯的危险……有谁知道如何解决它!?

最佳答案

如前所述,这些函数以前称为“makepoint”和“distance_sphere”,但后来用“ST_”前缀重命名(ST = “空间类型”)。

一个非常简单的解决方案是添加 legacy.sql您的template_postgis(如果使用)或您的目标数据库使用类似的功能:

sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/legacy.sql

关于postgresql - 函数makepoint postgresql 9.1错误postgis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24061859/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com