PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ parse_WKT_lwgeom()

Datum parse_WKT_lwgeom ( PG_FUNCTION_ARGS  )

Definition at line 728 of file lwgeom_inout.c.

References LWGEOM_in(), LWGEOM_recv(), PG_FUNCTION_INFO_V1(), and text_to_cstring().

Referenced by elog_ERROR().

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