Syntax
OVER () treats all input rows as one partition. The whole partition is processed across chunk boundaries. ORDER BY inside OVER, explicit window frames, DISTINCT, IGNORE NULLS, RESPECT NULLS and analytic execution hints are unsupported. An outer query ORDER BY is allowed. There are no scalar, array or ordinary aggregate overloads.
Parameters and input
tolerance and simplify_boundary must be foldable plan constants. Tolerance must be finite and nonnegative, and its square must be representable as a finite DOUBLE. The two-argument form defaults to simplify_boundary = true; an explicit NULL does not use the default.
Tolerance is an area-based Visvalingam–Whyatt parameter related to the square root of effective triangle area, in input coordinate units. EPSG:4326 uses Cartesian degrees and EPSG:3857 uses projected metres, not geodesic ground distance. No reprojection, snapping or coordinate clamping is performed. This is not a Hausdorff or maximum-distance guarantee and does not promise unchanged area, maximal vertex reduction or identical PostGIS output.
With true, both shared and exterior boundaries may simplify. With false, only shared internal edges simplify; exterior boundaries, gaps and unfilled hole boundaries retain their original edges. A hole filled by another coverage member is a shared internal boundary.
Inputs must be POLYGON or MULTIPOLYGON with the same planar GEOMETRY CRS descriptor. Nonempty polygon interiors must not overlap, and shared edges must have matching vertices. Gaps are allowed (gapWidth = 0). The function does not check that the input is a valid coverage. For invalid input, the output may contain artifacts and is not guaranteed to be a valid coverage. No repair, union or automatic noding is performed. GEOGRAPHY, POINT, LINESTRING, GEOMETRYCOLLECTION and Z/M are unsupported. UNKNOWN/MIXED storage dimension metadata is accepted only when the actual computed values pass XY validation.
Result and errors
Returns native XY WKB GEOMETRY with the input CRS and one output per input row. For valid coverages, POLYGON/MULTIPOLYGON family, component order, holes, ring winding, contacts, junctions and shared boundaries are preserved. A single-member MULTIPOLYGON remains MULTIPOLYGON. Row mapping is positional; identical inputs are not deduplicated.- NULL geometry returns NULL at its original position and is excluded from the coverage.
- Typed POLYGON/MULTIPOLYGON EMPTY preserves its family and position.
- NULL tolerance or explicit NULL boundary returns NULL for every row without running the coverage kernel. Type and plan-constant checks still apply.
- Zero tolerance retains structural input checks and returns the original WKB bytes, including repeated closing coordinates.
- Invalid parameters are rejected even for all-NULL/all-EMPTY or empty input. Malformed WKB, structurally invalid rings, unsupported descriptors/dimensions and exceeded limits fail the partition before its output is published.