Geoserver ERROR: function postgis_lib_version()

夙愿已清 提交于 2019-12-01 17:11:06

问题


in geoserver whene i need to creat a new data store after to creat new workspace, i have this error

Error creating data store, check the parameters. Error message: Unable to obtain connection: ERROR: function postgis_lib_version() does not exist Indice : No function matches the given name and argument types. You might need to add explicit type casts. Position : 8


回答1:


That error implies that you are attempting to add a PostgreSQL database rather than a PostGIS database. You need to add the PostGIS extension to the database with this command:

psql -d yourdatabase -c "CREATE EXTENSION postgis;"
psql -d yourdatabase -c "CREATE EXTENSION postgis_topology;"

This will then allow you to store geometries (and geographies) in your tables which GeoServer can then display as map layers.



来源:https://stackoverflow.com/questions/38608510/geoserver-error-function-postgis-lib-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!