Common behavior
- Native constructors and serializers support all seven two-dimensional OGC families:
POINT,LINESTRING,POLYGON,MULTIPOINT,MULTILINESTRING,MULTIPOLYGON, andGEOMETRYCOLLECTION. They also support typedEMPTYvalues and empty children. - A
NULLargument producesNULL. Constructors also returnNULLfor malformed WKT/WKB or unsupported constructor parameters. - Native compute functions require an XY value and a valid descriptor. Unsupported families, dimensions, or descriptors produce a controlled error unless a row-specific rule below says that
EMPTYproducesNULL. GEOGRAPHYandGEOMETRYare distinct logical types. Mixed-kind calls have no overload and are rejected.GEOGRAPHYusesOGC:CRS84, spherical edges, longitude/latitude coordinate order, and SRID 4326.GEOMETRYuses planar semantics and the explicit CRS stored in its descriptor. Use ST_Transform for the supportedGEOMETRYreprojections.
Constructors
Geography coordinates must satisfy the supported longitude and latitude ranges. Geometry constructors do not reinterpret coordinates and do not transform them into another CRS. See ST_GeogFromText, ST_GeogFromWKB, ST_GeomFromText, and ST_GeomFromWKB.
Serializers
See ST_AsText and ST_AsWKT and ST_AsBinary and ST_AsWKB.
Initial compute functions
See ST_X, ST_Y, ST_GeometryType, ST_Distance, and ST_DWithin.
Containment predicates
These overloads support an XY
POINT with a POLYGON or MULTIPOLYGON. GEOGRAPHY evaluates spherical CRS84 edges; GEOMETRY evaluates planar edges and requires matching descriptors. NULL propagates, while an EMPTY input returns false. Unsupported families, dimensions, descriptors, and mixed GEOGRAPHY/GEOMETRY calls are rejected. See ST_Contains, ST_Within, ST_Covers, and ST_CoveredBy.
Intersection predicate
These overloads support XY
POLYGON and MULTIPOLYGON values. GEOMETRY inputs require matching descriptors. NULL propagates, while an EMPTY input returns false. Unsupported families, collections, and mixed native logical types are rejected. See ST_Intersects.
Measurements and properties
All overloads accept the seven XY OGC families and recurse through
MULTI* and GEOMETRYCOLLECTION where applicable. NULL propagates. Measurements return zero for EMPTY; ST_Centroid returns POINT EMPTY; ST_IsValid returns true. Topology-invalid readable values return false only from ST_IsValid; measurements and centroid reject them. Malformed WKB and unsupported dimensions or descriptors are errors.
Spherical polygon rings are orientation-independent and normalized to their smaller region; a single ring does not represent more than a hemisphere. See ST_Area, ST_Length, ST_Perimeter, ST_Centroid, and ST_IsValid.
CRS metadata and transformation
The two target SRIDs must be FE-foldable constants equal to 4326 or 3857. Source CRS must be EPSG:4326, EPSG:3857, or OGC:CRS84.
ST_Transform handles all seven XY OGC families and collections; NULL propagates and EMPTY stays empty. See ST_SRID, ST_SetSRID, and ST_Transform.
Legacy compatibility
See Legacy spatial functions for the full list of functions that use the existingVARCHAR shape encoding.
Upgrade and reference-test contract
For a rolling upgrade, upgrade BEs before FEs. Native scalar functions use the ordinary stable function-ID dispatch and do not introduce a separate GEO version gate. The coverage window registry is described below. A newer FE with an older BE is not a supported upgrade order. The contract is enforced by focused FE analyzer tests for overload resolution, return types, legacy compatibility, and function IDs, and by BE registry tests for every native ID. Existing BE function tests cover constant, nullable, varying,EMPTY, malformed-input, family, dimension, CRS, and descriptor behavior.
Polygon overlays
Native XY polygons and multipolygons with compatible CRS; Cartesian semantics in both 4326 and 3857. NULL propagates. ForST_Union, ST_Difference, and ST_SymDifference, one component returns POLYGON, multiple return MULTIPOLYGON, and empty returns POLYGON EMPTY. Invalid topology is an error. See the linked pages for precision and resource limits.
ST_Intersection also preserves shared edges and isolated contact points, returning line or point families when no area is present, or GEOMETRYCOLLECTION for mixed dimensions. Parts covered by higher-dimensional output are not repeated; disjoint inputs return POLYGON EMPTY.
Cartesian buffer
Native XY POINT, LINESTRING, POLYGON and their MULTI families; finite signed distance in input CRS units, round approximation, NULL propagation and polygonal EMPTY output. The result preserves CRS. GEOGRAPHY, collections, Z/M and options are unsupported by ST_Buffer.Topology preserving simplification
Cartesian XY scalar geometry with preserved families, rings, contacts, typed empty children and CRS. Tolerance uses input coordinate units. GEOGRAPHY, Z/M and cross-row coverage simplification are unsupported.H3 cell functions
These overloads require native XY CRS84 GEOGRAPHY for geometry arguments; the cell is a signed BIGINT. See H3 functions for validity, NULL/EMPTY, fill approximation, and limits.Joint coverage simplification (window)
Both overloads process the whole partition jointly and return one XY GEOMETRY per row with the original family and CRS. Parameters must be foldable plan constants; OVER is required. No inner ORDER BY, explicit frame or ordinary aggregate support. See ST_CoverageSimplify for topology, NULL/EMPTY, tolerance and resource limits.
GEOGRAPHY overloads are not registered. BE resolves this window function by name and logical argument/result types through the window registry. Upgrade BEs before FEs.