[postgis-users] postgis_restore.pl loads no data (pg-8.1, postgis-1.1)

Benjamin Thelen bt at ccgis.de
Thu Jan 12 10:50:19 PST 2006


Hi list,

I backed up a postgresql/postgis DB from a 
postgresql-8.0.4/postgis-1.0.4 combination and tried to restore the dump 
into a 8.1.2/1.1.0 combination and failed. It seems that all 
(functions,..) but the data itself is uploaded. The procedure just stops 
as it seems without any error message. Please have a look at the end of 
the output below.

The most interesting part is that I also tried to upload the same dump 
into the same DB but using an old postgis_restore.pl from postgis-1.0.4 
and succeeded! At least it seems at first glance. In this case the 
output doesn't stop as you see below, but continues to load the data 
itself into the database.


I couldn't find anything on the internet, just the information, that 
postgis itself is pg-8.1 compatible and postgis_restore.pl hasn't 
officially been testet with this pg version.


I'm a bit at a loss. Do I have to go back to 8.0? Is there something 
I've overlooked, I can do?

Thanks,
Ben


.
.
.
LANGUAGE 'plpgsql' IMMUTABLE STRICT;
CREATE FUNCTION
--
-- SFSQL 1.1
--
-- BdMPolyFromText(multiLineStringTaggedText String, SRID Integer):
MultiPolygon
--
--  Construct a MultiPolygon given an arbitrary
--  collection of closed linestrings as a
--  MultiLineString text representation.
--
-- This is a PLPGSQL function rather then an SQL function
-- To raise an exception in case of invalid input.
--
CREATE OR REPLACE FUNCTION BdMPolyFromText(text, integer)
RETURNS geometry
AS '
DECLARE
	geomtext alias for $1;
	srid alias for $2;
	mline geometry;
	geom geometry;
BEGIN
	mline := MultiLineStringFromText(geomtext, srid);

	IF mline IS NULL
	THEN
		RAISE EXCEPTION ''Input is not a MultiLinestring'';
	END IF;

	geom := multi(BuildArea(mline));

	RETURN geom;
END;
'
LANGUAGE 'plpgsql' IMMUTABLE STRICT;
CREATE FUNCTION
---------------------------------------------------------------
-- END
---------------------------------------------------------------
COMMIT;
COMMIT
DROP TABLE geometry_columns;DROP TABLE spatial_ref_sys;
DROP TABLE
DROP TABLE





More information about the postgis-users mailing list