[postgis-users] Moving PostGIS tables between different PGSQL+PostGIS versions
Leonardo Mateo
leonardomateo at gmail.com
Thu Aug 30 10:40:48 PDT 2007
On 8/30/07, Kevin Neufeld <kneufeld at refractions.net> wrote:
> You don't need to dump the entire database, you can use pg_dump to dump
> one table:
>
> pg_dump -t my_table my_old_db | psql my_new_db
>
> This may fail if foreign keys are referencing non-existent tables in the
> new database, but for the most part, it's tried and true.
This will also fail if PostGIS differs (version and/or location) from
one server to another.
It is also tried and true.
> Don't forget to update the geometry_columns table in your new db.
>
That's true, take a look, but the geometry_colums table is also dumped
and should be restored. If some errors are raised when importing the
database, make sure the geometry_columns table is imported after all
referenced tables. You can check the generated SQL for that.
Now I realized that I assumed that you've dumped your database in SQL
format, I never asked you for that, if not, you should, also with
--column-inserts option to have more control over the dumped data.
Hope everything go well, if not, let me know and see if I can help you.
Cheers.
--
Leonardo Mateo.
There's no place like ~
More information about the postgis-users
mailing list