[postgis-users] How to set the parent schema of postgis 2.0 to "postgis" instead of "public"

Andy Colson andy at squeakycode.net
Mon Apr 2 19:40:43 PDT 2012


On 04/02/2012 06:40 PM, THX1138 wrote:
> Hello All,
> I am attempting to keep my non-gis information separate from my gis
> information and thus would like to create a separate postgis schema but I
> have run into some problems.
>
> I ran the following commands to move the data into a new schema:
>
> CREATE schema postgis;
> ALTER EXTENSION postgis SET SCHEMA postgis;
> SET search_path TO "$user",public,postgis
>
> Yet, for some reason when I run a spatial query such as "select
> st_makevalid(geom) from jurisdictions", I get the following error:
>
> ERROR:  function st_makevalid(postgis.geometry) does not exist
> LINE 1: select st_makevalid(geom) from jurisdictions
>                 ^
> HINT:  No function matches the given name and argument types. You might need
> to add explicit type casts.
>
> Can anyone point me in the right direction as to how to fix this?
>
> I am still using beta 3, so perhaps this error has been fixed in later
> versions.
>
> Another problem might be that I have legacy functions  installed in the
> public schema and that they somehow conflict with postgis 2.0 being
> installed in the postgis schema. If this is the case, is it possible to
> import those functions into the postgis schema as well (or their own
> schema)?
>
> Thanks
>
> THX1138
>
> --
> View this message in context: http://postgis.17.n6.nabble.com/How-to-set-the-parent-schema-of-postgis-2-0-to-postgis-instead-of-public-tp4680493p4680493.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


Not sure, but, maybe you need to create it up front:


CREATE extension postgis with SCHEMA postgis;


-Andy



More information about the postgis-users mailing list