[postgis-users] postgis from ubuntu to suse
Kevin Neufeld
kneufeld.ca at gmail.com
Tue Dec 7 13:26:50 PST 2010
I agree with Brent here that it works nicely for me as well to pg_dump
<src db params> | psql <target db params>
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.
Typically PostGIS is installed in the public schema, so I usually do
this which excludes the public schema from the dump:
pg_dump -N public <other args> <dbname> | psql <options>
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.
Cheers,
Kevin
On 12/7/2010 12:18 PM, pcreso at pcreso.com wrote:
> Hi Vinicius,
>
> 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.
>
> Otherwise use the usual commands to install Postgis in a Postgres
> database:
>
> createlang plpgsql <new db> (not needed with Postgres v9.0+)
> psql -d <new db> -f <path to>/postgis.sql
> psql -d <new db> -f <path to>/spatial_reference_sys.sql
>
> You'll need to find where SuSE has put the last two files, if you have
> "locate" installed, then
> "locate postgis.sql" will tell you where, or you can use "find"...
>
> According to
> http://wiki.openstreetmap.org/wiki/Mapnik/PostGIS#For_Opensuse_11_2
>
> the path is /usr/share/postgresql/contrib/
>
>
>
> Cheers,
>
> Brent Wood
>
>
> --- On *Wed, 12/8/10, Vinicius /<vinicius647 at gmail.com>/* wrote:
>
>
> From: Vinicius <vinicius647 at gmail.com>
> Subject: Re: [postgis-users] postgis from ubuntu to suse
> To: pcreso at pcreso.com
> Cc: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Wednesday, December 8, 2010, 4:58 AM
>
> Hi..
>
> I created the database manually, but how do I install postgis into
> this database ?
> I´ve used Software Management to install postgresql and postgis,
> but when I create a new database it´s completelly empty.
>
> tks..
>
>
> On 06/12/2010 20:00, pcreso at pcreso.com
> </mc/compose?to=pcreso at pcreso.com> wrote:
>> Which version of PostGIS is on each box?
>>
>> 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>
>>
>> Brent Wood
>>
>> --- On *Tue, 12/7/10, Vinicius /<vinicius647 at gmail.com>
>> </mc/compose?to=vinicius647 at gmail.com>/* wrote:
>>
>>
>> From: Vinicius <vinicius647 at gmail.com>
>> </mc/compose?to=vinicius647 at gmail.com>
>> Subject: [postgis-users] postgis from ubuntu to suse
>> To: postgis-users at postgis.refractions.net
>> </mc/compose?to=postgis-users at postgis.refractions.net>
>> Date: Tuesday, December 7, 2010, 8:27 AM
>>
>> Hi people..
>>
>> 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.
>>
>> How Can I solve this problem, it is possible ?
>>
>> tks...
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101207/2f21669d/attachment.html>
More information about the postgis-users
mailing list