If you mean from one postgis database to another postgis database I think
you will find pg_dump most helpful using the -t flag for the table you want.

If they are both on the same cluster:

pg_dump -t myTable myDatabase1 | psql myDatabase2

(caveat is make sure that the second database has postgis extension
installed first)

Otherwise, dump to a file

pg_dump -t myTable myDatabase1 | gzip -9 > myTable.sql.gz

unzip and reload into second database.

cheers

Ben


On 14 October 2014 00:45, Stephen Crawford <[email protected]> wrote:

> Hello All,
>
> 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?
>
> Thanks,
> Steve
>
> --
> Stephen Crawford
> Center for Environmental Informatics
> The Pennsylvania State University
>
>
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 

Ben Madin
BVMS PhD, MANZCVS

t : +61 8 6102 5535
m : +61 448 887 220
e : [email protected]

AusVet Animal Health Services
Western Australia

www.ausvet.com.au
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to