Database reference - postgis

postgis -  functions -  public.st_polyfromtext

Description

none

Function properties

namevalue
namepublic.st_polyfromtext
return typepublic.geometry 
languageSQL
deterministicYES

Usage

result = public.st_polyfromtext();

Code

CREATE FUNCTION st_polyfromtext(text) RETURNS geometry
    AS $_$
    SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'POLYGON'
    THEN GeomFromText($1)
    ELSE NULL END
    $_$
    LANGUAGE sql IMMUTABLE STRICT;




Documentation generated by SqlSpec