On 14 October 2014 05:45, Stephen Crawford <[email protected]> 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 [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
