ST_sort

更新时间:
复制 MD 格式

Sorts all pcpoint objects in a pcpatch object based on the specified attribute dimensions and returns a new pcpatch object containing the sorted points.

Syntax

pcpatch ST_sort(pcpatch pc, text[] dimnames);

Parameters

ParameterTypeDescription
pcpcpatchThe pcpatch object to sort.
dimnamestext[]An array of attribute dimension names.

Examples

The following example sorts the pa column in the patches table by y first, then by x.

UPDATE patches SET pa = ST_sort(pa, ARRAY['y', 'x']);