[postgis-users] Postgis doesn't work after search_path

Sandro Santilli strk at keybit.net
Tue Aug 4 00:56:07 PDT 2015


On Tue, Aug 04, 2015 at 09:21:56AM +0200, franco base wrote:
> Postgis is in Public Schema
> 
> I run
> ALTER DATABASE mydb SET search_path TO 'test'
> 
> After Postgis doesn't work

This is expected.

> So I give this command
> reset search_path
> 
> and then
> alter database mydb set search_path = "$user", public, topology
> 
> This select:
> SELECT r.rolname, d.datname, rs.setconfig
> FROM   pg_db_role_setting rs
> LEFT   JOIN pg_roles      r ON r.oid = rs.setrole
> LEFT   JOIN pg_database   d ON d.oid = rs.setdatabase
> 
> show that mydb is now ok and the setconfig is the same for all the db:
> "{"search_path=\"$user\", public, topology"}"
> 
> 
> On the other db Postgis is ok but on 'mydb' postgis doesn't work again.
> This is the error (it's the same for all postgis function):
> 
> ERROR:  function st_union(public.geometry) does not exist
> LINE 33: select st_union(wkb_geometry) AS wkb_geometry
> 
> Have you any tips?

show search_path;
select n.nspname from pg_namespace n, pg_proc p where p.proname =
'st_union' and n.oid = p.pronamespace;

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the postgis-users mailing list