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

Ben Madin ben at ausvet.com.au
Wed Aug 5 01:00:47 PDT 2015


Hi,

I don't want to burst your bubble, but I think it would pay to take a
little bit longer to work out what the search_path means and why it didn't
work. It will save you great pain and tears in the future.

cheers

Ben

On 4 August 2015 at 16:07, franco base <frenk.calza at gmail.com> wrote:

> Hi Sandro,
> Your select returns public (8 rows).
> But i just solved restarting the server.
>
> Thanks a lot.
>
> FB
>
>
>
>
> 2015-08-04 9:56 GMT+02:00 Sandro Santilli <strk at keybit.net>:
>
>> 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
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 

Ben Madin
BVMS PhD, MANZCVS

t : +61 8 6102 5535
m : +61 448 887 220
e : ben at ausvet.com.au

AusVet Animal Health Services
Western Australia

www.ausvet.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150805/2fb18ff4/attachment.html>


More information about the postgis-users mailing list