[postgis-users] Migrating part of database (At schema or table level) between two version of postgis.

Hemant Bist hemantbist at gmail.com
Thu Oct 19 12:24:41 PDT 2017

Thanks, I will give it a try.
All the new data schemas were created long after installation of postgis
so postgis cannot be installed there.
Most probably the postgis functions/objects are in public schema.
1) the posgtis was installed via create extension postgis ; -- no schema
was specified.
2) There is only one table with name  spatial_ref_sys and its in public

select table_schema from information_schema.tables where table_name

On Thu, Oct 19, 2017 at 10:43 AM, Sandro Santilli <strk at kbt.io> wrote:

> On Thu, Oct 19, 2017 at 10:21:46AM -0700, Hemant Bist wrote:
> > We  have an old database (postgis 2.1.2/postgresql-9.3/ubuntu 14.04),
> and a
> > new database (postgis 2.4.0,postgresql-9.5,ubuntu 16.04). Old database
> was
> > created via Hard Upgrade
> > <https://postgis.net/docs/postgis_installation.html#hard_upgrade>
> Although
> > both dbs have spatial tables in public schema, the data I want to copy
> over
> > is in their own schemas.
> >
> > Can I do the following?
> > 1) Copy data for a schema/tables  from old db to new db?
> > 2) Copy data for a schema /tables from new db to old db? NOT sure what
> the
> > caveats here would be.
> If your data is in a *different* schema from the postgis
> functions/objects it should be straight-forward to move them around
> (pg_dump/pg_restore). If postgis is in the same schema as the data
> you'll need postgis_restore.pl instead of pg_restore. In both cases
> you can restrict the pg_dump to the schema of interest.
> --strk;
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20171019/60d5dd4e/attachment.html>

More information about the postgis-users mailing list