[postgis-users] export

Rémi Cura remi.cura at gmail.com
Wed Oct 15 01:33:20 PDT 2014


Exporting using shapefile is a bad idea.
If anything in your data base is relational, it will be lost.
Same for special indexes, triggers, permission, etc etc.

For the moment it's quit painfull to use dblink or fdw because you have to
do it table by table.
(sur it can be automatized, but it is clumsy at best)

pg_dump is the only way to copy the table, it's data and all the "meta"
info (owner, index, etc).

Cheers,
Rémi-C

2014-10-14 22:29 GMT+02:00 Mike Toews <mwtoews at gmail.com>:

> On 14 October 2014 05:45, Stephen Crawford <src176 at psu.edu> wrote:
> > I want to copy a postgis table from one database to another.  Is dumping
> to
> > a shapefile the best way to do this? Any other method? Pros and cons?
>
> Shapefiles may work for simple tasks, but there is a long list of
> problems with the DBF format used to store attributes, such as the
> length of field names, etc., that could make this technique
> problematic. If you have recent versions of PostgreSQL on the other
> server, the modern way to copy between databases is to use foreign
> data wrappers, or postgres_fdw
> http://www.postgresql.org/docs/current/static/postgres-fdw.html
>
> Here is a decent example:
> http://www.craigkerstiens.com/2013/08/05/a-look-at-FDWs/
>
> And stay tuned to PostgreSQL 9.5, where there will be a "IMPORT
> FOREIGN SCHEMA" technique to expose more than one table.
>
> http://www.depesz.com/2014/07/14/waiting-for-9-5-implement-import-foreign-schema/
>
> -Mike
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141015/e578de2b/attachment.html>


More information about the postgis-users mailing list