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

Definition at line 730 of file lwgeom_inout.c.

References LWGEOM_in(), and text2cstring().

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

Here is the call graph for this function: