[postgis-users] Possible Problem with "Hard Upgrade" instructions (UNCLASSIFIED)

strk at refractions.net strk at refractions.net
Wed Dec 13 01:30:21 PST 2006


On Tue, Dec 12, 2006 at 06:35:40PM -0500, Cowart, Donald Z SAJ Contractor wrote:

> 	# 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

Is 'truncate' available back to PostgreSQL 7.1 ?
--strk;



More information about the postgis-users mailing list