[postgis-devel] Building multidimensional arrays from tuple sets

strk strk at keybit.net
Thu Jan 13 05:27:35 PST 2011


On Tue, Dec 28, 2010 at 10:56:26AM +0100, strk wrote:
> Does anyone here have a neat trick to build something like:
> 
>   '{{1,2},{10,20}}'::int[][]
> 
> >From this input:
> 
>    a  | b
>    ---+----
>    1  | 2
>    10 | 20
>    (2 rows)
> 
> Such bidimensional arrays are used for TopoElementArray in
> postgis topology. I can't find an easy way to deal with them
> so I'm wondering if I should provide some as part of topology.sql
> 
> Power user tips, otherwise ?

For the record: I've added a topology.TopologyElementArray_agg
aggregate function for this.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list