<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>Andrea,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>In theory you can but you shouldn't. It would get very
confusing and you would quickly loose your sanity as you would have to schema
qualify each postgis function, geometry type etc and it wouldn't work with any
third party tools correctly because they most likely will not schema
qualify. I would avoid it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>You can as of PostGIS 1.4 (well technicall 1.3 since the
names of the .so, .dell changed) have databases running postgis 1.3,
another running postgis 1.4 and yet another running trunk postgis
1.5</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>If you need different versions of postgis -- you
would be better off installing them in different databases.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>We for example have a </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>template_postgis15</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>a </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>template_postgis14</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>and a </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>template_postgis13</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>and when we want to use PostGIS 1.5 we create a new
database using the template_postgis15 as the template -- take the backup of my
old postgis database (say from 1.3 or 1.4) (minus the public schema) and then
restore on this fresh</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>postgis 1.5 db. Seems to work pretty well (even works if
you do restore the public schema though will give errors you can ignore as well
since all the functions in your backup that are already installed will be
ignored).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>If you want to create a backup file minus the public schema --
you can use the pg_dump -N public option to backup all schemas except
public.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=064015021-04102009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Andrea Peri<BR><B>Sent:</B> Sunday, October 04, 2009 5:22 PM<BR><B>To:</B>
postgis-users@postgis.refractions.net<BR><B>Subject:</B> Re: [postgis-users]
Install postgis on a different schema<BR></FONT><BR></DIV>
<DIV></DIV><PRE>Hi,<BR><BR>I'm testing the Stephen's approach.<BR>It work very well.<BR><BR>In effect with this solution it work very well .<BR><BR>Hovewer I'll try even to install postgis on different schema.<BR>I like to know if is possible to install some version of postgis on different schemas of the same database.<BR>
This knowledge can be useful when I need to backup and restore a single schema even if the principal version of <BR>postgis is changed.<BR><BR>Many thx for hints.<BR><BR>Andrea.<BR><BR><BR><BR><BR><BR>>Generally speaking I tend to follow<BR>
>Stephen's approach because the installing postgis in a non-public schema is<BR>>not as tried and tested.<BR> <BR>>I'm not even sure if there are any assumptions embedded in products that<BR>>support postgis we don't know that assume postgis is in public.<BR>
> <BR>>Aside from that -- there isn't any problem with that as long as you add the<BR>>postgis schema to your database search_path.<BR>> <BR>>Hope that helps,<BR>>Regina</PRE><BR
clear=all><BR>-- <BR>-----------------<BR>Andrea Peri<BR>. . . . . . . . .
<BR>qwerty אטלעש<BR>-----------------<BR><BR></BODY></HTML>