postgis not available for all postgres users

走远了吗. 提交于 2019-12-02 04:32:27

The PostGIS extension must be installed in a schema that must also be in the user search path.

You can check where it is installed with the command

select e.extname,n.* 
from pg_extension e, pg_namespace n 
where e.extnamespace = n.oid and e.extname='postgis';

And you can check if the schema where it is installed is in the user search path by issuing

show search_path;

If not, you can permanently add the path by altering the user.

ALTER USER username SET search_path TO "$user", public, postgis_schema;

As the previous command takes effect at the next login only, you can apply it immediately by applying

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