66 int32 typmod = PG_GETARG_INT32(0);
72 POSTGIS_DEBUGF(3,
"Got typmod(srid = %d, type = %d, hasz = %d, hasm = %d)", srid,
type, hasz, hasm);
75 if (!(srid ||
type || hasz || hasm) || typmod < 0)
77 PG_RETURN_CSTRING(pstrdup(
""));
82 appendStringInfoChar(&si,
'(');
87 else if (srid || hasz || hasm)
88 appendStringInfoString(&si,
"Geometry");
91 if (hasz) appendStringInfoString(&si,
"Z");
94 if (hasm) appendStringInfoString(&si,
"M");
97 if (srid) appendStringInfo(&si,
",%d", srid);
100 appendStringInfoChar(&si,
')');
102 PG_RETURN_CSTRING(si.data);
#define TYPMOD_GET_SRID(typmod)
Macros for manipulating the 'typemod' int.
#define TYPMOD_GET_M(typmod)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define TYPMOD_GET_TYPE(typmod)
#define TYPMOD_GET_Z(typmod)