[postgis-users] ST_Union does not exist

Dylan Beaudette debeaudette at ucdavis.edu
Thu May 28 17:41:51 PDT 2009


On Thursday 28 May 2009, Paragon Corporation wrote:
> Dylan,
>
> Did it work before?  Aggegates unfortunately don't get upgraded since there
> is no CREATE OR REPLACE AGGREGATE logic in PostgreSQL, so if you have been
> upgrading the same db prior to 1.3 -- unless you manually run those CREATE
> AGGREGATE calls, they won't be there.
>

Ah, ok. I didn't realize this. I was able to make things work by loading 
lwpostgis.sql-- after removing the transaction checks. Not sure if this was 
the proper thing to do... I had been upgrading this DB since postgis-1.2, so 
those AGGREGATE statements had never been run.

This would be a nice bit of advice in the Installation section of the manual-- 
i.e. something about when just running lwpostgis_upgrade.sql is not enough.

Thanks for the advice!

Dylan

>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Dylan
> Beaudette
> Sent: Thursday, May 28, 2009 3:13 PM
> To: PostGIS Users Discussion
> Subject: [postgis-users] ST_Union does not exist
>
> Hi,
>
> Noticed this today:
>
> -- basic query
> SELECT ST_Buffer(ST_UNION(wkb_geometry), 0.1) as wkb_geometry FROM
> 	(
> 	SELECT 1 as id, wkb_geometry
> 	FROM map
> 	) as a
> GROUP BY a.id;
>
> -- error message
> ERROR:  function st_union(geometry) does not exist
>
> -- software version (Postgresql 8.3.7)
> POSTGIS="1.3.6" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec 2007"
> USE_STATS
>
> Could this be related to my recent upgrade from postgis 1.3.3 ? Other
> postgis queries seem to work.
>
> I was able to get a result using GeomUnion(geometry)--- but for anything
> more than a couple features this would take > 1 hour, not finishing, and
> could not be canceled by the user.
>
> Grepping through the source reveals:
> /src/postgresql-8.3.7/contrib/postgis-1.3.6$ grep -R -i
> 'st_union(geometry)' *
>
> postgis_comments.sql:COMMENT ON AGGREGATE ST_Union(geometry) IS 'args:
> g1field - Returns a geometry that represents the point set union of the
> Geometries.';
>
> Ideas?
>
> Dylan
>
>
> --
> Dylan Beaudette
> Soil Resource Laboratory
> http://casoilresource.lawr.ucdavis.edu/
> University of California at Davis
> 530.754.7341
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341



More information about the postgis-users mailing list