TopoElementArray — TopoElement 对象的数组。
1 个或多个 TopoElement 对象的数组,通常用于传递 TopoGeometry 对象的组件。
SELECT '{{1,2},{4,3}}'::topology.topoelementarray AS tea;
{{1,2},{4,3}}
This is the more verbose equivalent.
SELECT ARRAY[ARRAY[1, 2], ARRAY[4, 3]]::topology.topoelementarray AS tea;
{{1,2},{4,3}}
This example uses the array aggregate function packaged with topology.
SELECT topology.TopoElementArray_Agg(ARRAY[e, t] ORDER BY e, t) As tea
FROM generate_series(1, 4) As e CROSS JOIN generate_series(1, 3) As t;
{{1,1},{1,2},{1,3},{2,1},{2,2},{2,3},{3,1},{3,2},{3,3},{4,1},{4,2},{4,3}}
SELECT '{{1,2,4},{3,4,5}}'::topology.topoelementarray AS tea;
ERROR: value for domain topology.topoelementarray violates check constraint "dimensions"