[postgis-users] How to update (replace) a Postgis table?

Stefan Schwarzer stefan.schwarzer at unep.org
Thu Feb 7 22:34:38 PST 2013


Hi there,

I would like to "update" a "countries of the world"-postgis-table, by replacing it with another one which comes in form of a shapefile (dumped from a Postgis database) from my development server.

Now, I can't just do a "pgsql2shp", as this would throw an error as the table already exists. And renaming the existing table into something like "xx_original" doesn't work either ("xx_geom_gist already exists", is then the error message).

I don't want to delete the (old) table directly, as I would like to keep it as a backup.

So, what is the "right" way to solve this? Thanks for any hints!

Stef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130208/882eeebc/attachment.html>


More information about the postgis-users mailing list