PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum parse_WKT_lwgeom ( PG_FUNCTION_ARGS  )

Definition at line 727 of file lwgeom_inout.c.

References LWGEOM_in(), and text2cstring().

728 {
729  text *wkt_text = PG_GETARG_TEXT_P(0);
730  char *wkt;
731  Datum result;
732 
733  /* Unwrap the PgSQL text type into a cstring */
734  wkt = text2cstring(wkt_text);
735 
736  /* Now we call over to the geometry_in function */
737  result = DirectFunctionCall1(LWGEOM_in, CStringGetDatum(wkt));
738 
739  /* Return null on null */
740  if ( ! result )
741  PG_RETURN_NULL();
742 
743  PG_RETURN_DATUM(result);
744 }
char * text2cstring(const text *textptr)
Datum LWGEOM_in(PG_FUNCTION_ARGS)
Definition: lwgeom_inout.c:84

Here is the call graph for this function: