Returns the geometry with the element order reversed.
geometry-expression.ST_Reverse()
ST_Geometry Returns the geometry with the element order reversed.
The spatial reference system identifier of the result is the same as the spatial reference system of the geometry-expression.
Returns the geometry with the order of its elements reversed. For a curve, a curve is returned with the vertices in the opposite order. For a collection, a collection is returned with the child geometries in the reversed order.
By default, ST_Reverse uses the original format for a geometry, if it is available. Otherwise, the internal format is used. For more information about internal and original formats, see STORAGE FORMAT clause, CREATE SPATIAL REFERENCE SYSTEM statement.
SQL/MM (ISO/IEC 13249-3: 2006) Vendor extension
The following example returns the result LineString (3 4, 1 2). It shows how the order of points in a linestring is reversed by ST_Reverse.
LineString (3 4, 1 2)
SELECT NEW ST_LineString( NEW ST_Point(1,2), NEW ST_Point(3,4) ).ST_Reverse()