我使用CREATE EXTENSION postgis WITH SCHEMA database创建了postgis扩展。
扩展名存在于扩展名列表(SELECT * FROM pg_extension)中
postgis版本2.5.1。
但是选择PostGis版本(SELECT PostGIS_full_version();)不起作用。
ERROR: function postgis_full_version() does not exist
LINE 1: SELECT PostGIS_full_version();我使用的是谷歌云。
怎么啦?我该怎么解决它呢?
发布于 2019-10-25 10:59:12
CREATE EXTENSION postgis WITH SCHEMA database
如果想要使用非默认模式,比如foo,那么需要调用select foo.postgis_full_version()
,但是您可能根本不想在中指定模式。在PostgreSQL中,除非另行指定,否则所有函数调用都默认使用public模式。所以说select postgis_full_version()和select public.postgis_full_version()是一样的。
尝试运行:
CREATE EXTENSION postgis;发布于 2019-10-25 15:24:19
此问题可能与PostGIS 2.5版有关。根据官方documentation的消息,Google Cloud PostGIS支持SQL2.3扩展家族。您可以在安装说明中找到here。
https://stackoverflow.com/questions/58527931
复制相似问题