错误:函数 addgeometrycolumn 不存在:尝试通过 QGIS DB Manager 将文件导入 POSTGIS 数据库时

Thu*_*ark 4 postgresql postgis qgis

我试图通过 QGIS 中的数据库管理器将 shapefile 导入到我的 POSTGIS 数据库,但出现错误,我不知道如何解决:

ERROR:  function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('demoschema','Bomen',NULL,31370,'MU...
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
Run Code Online (Sandbox Code Playgroud)

那么我需要做什么?

小智 6

如果 postgresSQL 中没有 postgis 扩展,如果您尝试向 postgresSQL 添加任何空间图层,则会出现上述错误。

在 pgadmin 中右键单击扩展并检查 postgis 扩展是否已保存。如果扩展中没有 postgis 选项,您可以按照以下步骤在 postgres 中安装 postgis https://www.youtube.com/watch?v=afK8GWpb8RU