[postgis-devel] Upgrading from 1.2.1 to 1.3.1

Charlie Savage cfis at savagexi.com
Tue Sep 4 09:22:45 PDT 2007


I've just upgraded a postgis 1.2.1 installation to 1.3.1.  To make sure 
it worked correctly, I then did a diff between a fresh postgis 1.3.1 
installation versus the upgraded one.

It looks like the upgrade script forgets to install a bunch of new 
aggregates introduced in 1.2.2.  To get the two installations in syn, I 
had to run the following sql on the upgraded database.

There also seems to have been a change to st_pointn which  now takes an 
additional integer parameter.

Thanks,

Charlie

---------------------
DROP FUNCTION postgis.st_pointn( geometry) CASCADE;


CREATE AGGREGATE ST_MemGeomUnion (
	basetype = geometry,
	sfunc = ST_union,
	stype = geometry
	);

CREATE AGGREGATE ST_memcollect(
	sfunc = ST_collect,
	basetype = geometry,
	stype = geometry
	);

CREATE AGGREGATE ST_Extent(
	sfunc = ST_combine_bbox,
	basetype = geometry,
	stype = box2d
	);

CREATE AGGREGATE ST_Extent3d(
	sfunc = ST_combine_bbox,
	basetype = geometry,
	stype = box3d
	);

CREATE AGGREGATE ST_accum (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[]
	);

CREATE AGGREGATE ST_MakeLine (
	sfunc = geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_makeline_garray
	);

CREATE AGGREGATE ST_Polygonize (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_polygonize_garray
	);

CREATE AGGREGATE ST_Union (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_unite_garray
	);

CREATE AGGREGATE ST_collect (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_collect_garray
	);



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20070904/c62eb361/attachment.bin>


More information about the postgis-devel mailing list