ST_range

更新时间:
复制 MD 格式

Returns a new pcpatch containing n consecutive points from a pcpatch, starting at a 1-based index. Use this function to extract a contiguous subset of points from a patch—for example, to sample a large patch in batches or paginate through points.

Syntax

pcpatch ST_range(pcpatch pc, integer start, integer n);

Parameters

ParameterDescription
pcThe source pcpatch object.
startThe 1-based index of the first point to include.
nThe number of points to return, starting from start (inclusive).

Examples

Update a column to retain only those points:

UPDATE patches SET pa = ST_range(pa, 2, 16);
--------------------------------------
(1 rows)