[postgis-devel] What's the difference between geom_accum andbuilt in postgresql array_append

Obe, Regina robe.dnd at cityofboston.gov
Wed Aug 20 06:41:26 PDT 2008


Mark,

Actually in building the cascade union approach, I realized a situation
where I actually needed this geom_accum vs. the array_append.  I got
some bizarre error which I'll need to investigate further whether it was
an error in my logic or something special about the geom_accum.   

The speeds were always the same, but I suspect the issue may come when
you have a null array that the geom_accum null array is naturally typed
as a geometry array and the array_append since its a generic array
operator becomes questionable what it is if it has nulls or is null.

At anyrate - that doesn't mean geom_accum isn't redundant and couldn't
be better served by just wrapping array_append in a sql function that
casts it to a geometry array.

I also haven't looked to see if geom_accum is used anywhere within the
postgis codebase itself apart from its use in the postgresql functions. 

It sure would have saved us that issue with the 1.3.2 release if we had
just used array_append since I realized the other solution of fixing a
bad 1.3.2 install was swapping out the use of geom_accum with
array_append. 

I presume also if structural or logical improvements to array handling
happen in future postgresql codebase, we would reap the benefits without
having to do anything special.

Thanks,
Regina

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Mark
Cave-Ayland
Sent: Wednesday, August 20, 2008 9:16 AM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] What's the difference between geom_accum
andbuilt in postgresql array_append

Paul Ramsey wrote:
> I'm pretty sure that code dates back to dblasby, so he'd have to weigh
> in on the why's and wherefore's.  strk would have just been
> maintaining what was there.
> 
> P.

Indeed. Since of the motivation for re-working SVN trunk is to remove 
legacy code where possible, I'm happy if Regina (or someone else) wants 
to write a patch to do this.


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-devel mailing list