<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I agree with Brent here that it works nicely for me as well to
pg_dump <src db params> | psql <target db params><br>
<br>
Just a word of caution that you may want to make sure that your
pg_dump excludes any PostGIS installation, especially if you are
changing versions. Otherwise, you are going to overwrite your new
installation with old PostGIS function definitions and confusion
will abound.<br>
<br>
Typically PostGIS is installed in the public schema, so I usually do
this which excludes the public schema from the dump:<br>
pg_dump -N public <other args> <dbname> | psql
<options><br>
<br>
Eventually, I would love to see PostGIS installed in it's own schema
which is treated by PostgreSQL like any other system schema
(information_schema, pg_catalog) and automatically excluded from
pg_dump. But for now, manual exclusion works.<br>
<br>
Cheers,<br>
Kevin<br>
<br>
<br>
On 12/7/2010 12:18 PM, <a class="moz-txt-link-abbreviated" href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a> wrote:
<blockquote cite="mid:61763.87401.qm@web33205.mail.mud.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">Hi Vinicius,<br>
<br>
If SuSE created a Postgis enabled template, you could use
that as the basis for your new database, so it will
already have Postgis installed.<br>
<br>
Otherwise use the usual commands to install Postgis in a
Postgres database:<br>
<br>
createlang plpgsql <new db> (not needed with
Postgres v9.0+)<br>
psql -d <new db> -f <path to>/postgis.sql<br>
psql -d <new db> -f <path
to>/spatial_reference_sys.sql<br>
<br>
You'll need to find where SuSE has put the last two files,
if you have "locate" installed, then <br>
"locate postgis.sql" will tell you where, or you can use
"find"...<br>
<br>
According to <br>
<a class="moz-txt-link-freetext" href="http://wiki.openstreetmap.org/wiki/Mapnik/PostGIS#For_Opensuse_11_2">http://wiki.openstreetmap.org/wiki/Mapnik/PostGIS#For_Opensuse_11_2</a><br>
<br>
the path is <span class="sy0">/</span>usr<span
class="sy0">/</span>share<span class="sy0">/</span>postgresql<span
class="sy0">/</span>contrib<span class="sy0">/</span><br>
<br>
<br>
<br>
Cheers,<br>
<br>
Brent Wood<br>
<br>
<br>
--- On <b>Wed, 12/8/10, Vinicius <i><a class="moz-txt-link-rfc2396E" href="mailto:vinicius647@gmail.com"><vinicius647@gmail.com></a></i></b>
wrote:<br>
<blockquote style="border-left: 2px solid rgb(16, 16,
255); margin-left: 5px; padding-left: 5px;"><br>
From: Vinicius <a class="moz-txt-link-rfc2396E" href="mailto:vinicius647@gmail.com"><vinicius647@gmail.com></a><br>
Subject: Re: [postgis-users] postgis from ubuntu to suse<br>
To: <a class="moz-txt-link-abbreviated" href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a><br>
Cc: "PostGIS Users Discussion"
<a class="moz-txt-link-rfc2396E" href="mailto:postgis-users@postgis.refractions.net"><postgis-users@postgis.refractions.net></a><br>
Date: Wednesday, December 8, 2010, 4:58 AM<br>
<br>
<div id="yiv1936890484">
<title></title>
Hi..<br>
<br>
I created the database manually, but how do I install
postgis into this database ?<br>
I´ve used Software Management to install postgresql
and postgis, but when I create a new database it´s
completelly empty.<br>
<br>
tks..<br>
<br>
<br>
On 06/12/2010 20:00, <a moz-do-not-send="true"
rel="nofollow"
class="yiv1936890484moz-txt-link-abbreviated"
ymailto="mailto:pcreso@pcreso.com" target="_blank"
href="/mc/compose?to=pcreso@pcreso.com">pcreso@pcreso.com</a>
wrote:
<blockquote type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">Which
version of PostGIS is on each box?<br>
<br>
One q'n'd approach which works for me is to
create the target db manually, install
Postgis into this manually, then use pg_dump
<src db params> | psql <target db
params><br>
<br>
Brent Wood<br>
<br>
--- On <b>Tue, 12/7/10, Vinicius <i><a
moz-do-not-send="true" rel="nofollow"
class="yiv1936890484moz-txt-link-rfc2396E"
ymailto="mailto:vinicius647@gmail.com"
target="_blank"
href="/mc/compose?to=vinicius647@gmail.com"><vinicius647@gmail.com></a></i></b>
wrote:<br>
<blockquote style="border-left: 2px solid
rgb(16, 16, 255); margin-left: 5px;
padding-left: 5px;"><br>
From: Vinicius <a moz-do-not-send="true"
rel="nofollow"
class="yiv1936890484moz-txt-link-rfc2396E"
ymailto="mailto:vinicius647@gmail.com"
target="_blank"
href="/mc/compose?to=vinicius647@gmail.com"><vinicius647@gmail.com></a><br>
Subject: [postgis-users] postgis from
ubuntu to suse<br>
To: <a moz-do-not-send="true"
rel="nofollow"
class="yiv1936890484moz-txt-link-abbreviated"
ymailto="mailto:postgis-users@postgis.refractions.net" target="_blank"
href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
Date: Tuesday, December 7, 2010, 8:27 AM<br>
<br>
<div class="yiv1936890484plainMail">Hi
people..<br>
<br>
I´ve had some problems to restore a
database backup from postgresql 8.3 on
Ubuntu to postgresql 8.4 on OpenSuse
11.3. I have many tables and indexes
using postgis, but when I try to restore
them on OpenSuse many errors about libs
occurs.<br>
<br>
How Can I solve this problem, it is
possible ?<br>
<br>
tks...<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a moz-do-not-send="true" rel="nofollow">postgis-users@postgis.refractions.net</a><br>
<a moz-do-not-send="true" rel="nofollow"
target="_blank"
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
</body>
</html>