[postgis-tickets] r16374 - #4006, cast json/jsonb to text in ST_GeomFromGeoJSON

Paul Ramsey pramsey at cleverelephant.ca
Thu Feb 8 11:11:45 PST 2018


Author: pramsey
Date: 2018-02-08 11:11:45 -0800 (Thu, 08 Feb 2018)
New Revision: 16374

Modified:
   trunk/postgis/postgis.sql.in
Log:
#4006, cast json/jsonb to text in ST_GeomFromGeoJSON


Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in	2018-02-07 07:47:55 UTC (rev 16373)
+++ trunk/postgis/postgis.sql.in	2018-02-08 19:11:45 UTC (rev 16374)
@@ -4293,6 +4293,18 @@
 	AS 'MODULE_PATHNAME','geom_from_geojson'
 	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL;
 
+-- Availability: 2.5.0
+CREATE OR REPLACE FUNCTION ST_GeomFromGeoJson(json)
+        RETURNS geometry
+        AS 'SELECT @extschema at .ST_GeomFromGeoJson($1::text)'
+        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
+
+-- Availability: 2.5.0
+CREATE OR REPLACE FUNCTION ST_GeomFromGeoJson(jsonb)
+        RETURNS geometry
+        AS 'SELECT @extschema at .ST_GeomFromGeoJson($1::text)'
+        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
+
 -- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION postgis_libjson_version()
 	RETURNS text



More information about the postgis-tickets mailing list