PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ geometry_geometrytype()

Datum geometry_geometrytype ( PG_FUNCTION_ARGS  )

Definition at line 193 of file lwgeom_ogc.c.

194{
195 GSERIALIZED *gser;
196 text *type_text;
197
198 /* Read just the header from the toasted tuple */
199 gser = PG_GETARG_GSERIALIZED_P_SLICE(0, 0, gserialized_max_header_size());
200
201 /* Build a text type to store things in */
202 type_text = cstring_to_text(stTypeName[gserialized_get_type(gser)]);
203
204 PG_FREE_IF_COPY(gser, 0);
205 PG_RETURN_TEXT_P(type_text);
206}
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
Definition gserialized.c:89
uint32_t gserialized_max_header_size(void)
Returns the size in bytes to read from toast to get the basic information from a geometry: GSERIALIZE...
static char * stTypeName[]
Definition lwgeom_ogc.c:174

References gserialized_get_type(), gserialized_max_header_size(), and stTypeName.

Here is the call graph for this function: