[postgis-users] How to set the parent schema of postgis 2.0 to "postgis" instead of "public"
lr at pcorp.us
Mon Apr 2 21:37:36 PDT 2012
It's a bug. Can you ticket this.
I noticed the same thing myslef when I tried to move postgis to a separate
schema but hadn't confirmed if it was my system, an issue with the extension
install or our postgis upgrade script. Long before I couldn't move it at
all because it complained about casts can't be moved etc.
If you look in public you'll see that there are two or so functions that
didn't move when you moved postgis to a different schema.
I mentioned it here and was meaning to ticket it as a separate item when I
confirmed it was a really issue.
I think quick fix would be to copy those functions from public but you need
to change the argument to postgis.geometry. I suspect there is a
public.geometry too that you can probably delete since all your tables are
now changed to be of postgis.geometry type.
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of Andy Colson
> Sent: Monday, April 02, 2012 10:41 PM
> To: PostGIS Users Discussion
> Cc: THX1138
> Subject: Re: [postgis-users] How to set the parent schema of
> postgis 2.0 to "postgis" instead of "public"
> 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:
> > s-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;
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users