]> granicus.if.org Git - postgis/commitdiff
#4006, cast json/jsonb to text in ST_GeomFromGeoJSON
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 8 Feb 2018 19:11:45 +0000 (19:11 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 8 Feb 2018 19:11:45 +0000 (19:11 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16374 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/postgis.sql.in

index 1b8d2e20f7d2fa2776a6060637592e71d4d98a10..ce8268b4dedbaeaece847114ab5ff0d9d04259c9 100644 (file)
@@ -4293,6 +4293,18 @@ CREATE OR REPLACE FUNCTION ST_GeomFromGeoJson(text)
        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@.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@.ST_GeomFromGeoJson($1::text)'
+        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
+
 -- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION postgis_libjson_version()
        RETURNS text