The result of this function is a JSON document which has a format that conforms to the GeoJSON standards as specified in https://tools.ietf.org/html/rfc7946 .
If you do not specify a RETURNS clause, the default return type is JSON with UNICODE as the character set. The length of the return value is 64000 bytes, which supports up to 32000 UNICODE characters. This can result in a failure if the underlying ST_Geometry object exceeds 64000 bytes when converted to a GeoJSON value.
The length of the converted GeoJSON value is greater than the underlying length of the ST_Geometry object.
The usual rules apply for the maximum length of each data type.
Data Type | Character Set | Maximum Length (characters) |
---|---|---|
VARCHAR | LATIN | 64000 |
UNICODE | 32000 | |
CLOB | LATIN | 2097088000 |
UNICODE | 1048544000 | |
JSON | LATIN | 16776192 |
UNICODE | 8388096 |