All Products
Search
Document Center

ApsaraDB RDS:ST_union

Last Updated:Mar 28, 2026

Merges a pcpatch array into a single pcpatch object.

Syntax

pcpatch ST_Union(pcpatch[] pcs);

Parameters

ParameterDescription
pcsThe pcpatch array to merge.

Examples

The following example merges all pcpatch values in the patches table and returns the total number of points.

SELECT ST_NumPoints(ST_Union(pa)) FROM patches;
 st_numpoints
--------------
          100
(1 row)