ST_union

更新时间: 2026-03-28 07:10:12

Merges an array of pcpatch entries into a single pcpatch object.

Syntax

pcpatch ST_Union(pcpatch[] pcs);

Parameters

ParameterDescription
pcsThe pcpatch array.

Examples

The following example compares the total point count computed by aggregating patches first (ST_Union) against the sum of per-patch point counts (ST_NumPoints). Both queries return 100.

-- Compare npoints(sum(patches)) with sum(npoints(patches)).
SELECT ST_NumPoints(ST_Union(pa)) FROM patches;
SELECT Sum(ST_NumPoints(pa)) FROM patches;

100
上一篇: ST_unCompress 下一篇: OGC WKB operations
阿里云首页 云原生数据库 PolarDB 相关技术圈