[postgis-users] Possible Problem with "Hard Upgrade" instructions (UNCLASSIFIED)
Cowart, Donald Z SAJ Contractor
Donald.Z.Cowart at saj02.usace.army.mil
Tue Dec 12 15:35:40 PST 2006
Classification: UNCLASSIFIED
Caveats: NONE
Hello All,
At the end of the "Hard Upgrade" section of README.postgis file (VERSION
1.1.2) included with the 1.2.0 release of Postgis we have:
# The spatial_ref_sys table is restored from the dump, to
# ensure your custom additions are kept, but the distributed
# one might contain modification so you should backup your
# entries, drop the table and source the new one.
# If you did make additions we assume you know how to backup them
before
# upgrading the table. Replace it with the new like this:
$ psql newdb
newdb=> drop table spatial_ref_sys;
DROP
newdb=> \i spatial_ref_sys.sql
Which does exactly what it says, drops then spatial_ref_sys table and then
tries to insert the spatial_ref_sys.sql file.
However, the spatial_ref_sys table is NOT created by the spatial_ref_sys.sql
file, so the insert fails.
So the fix would be to use:
$ psql newdb
newdb=> truncate spatial_ref_sys;
TRUNCATE TABLE
newdb=> \i spatial_ref_sys.sql
--Donald
GIS Web Architect
Jacksonville, FL
Classification: UNCLASSIFIED
Caveats: NONE
More information about the postgis-users
mailing list