65 char *
s = (
char*)palloc(64);
67 int32 typmod = PG_GETARG_INT32(0);
73 POSTGIS_DEBUGF(3,
"Got typmod(srid = %d, type = %d, hasz = %d, hasm = %d)", srid,
type, hasz, hasm);
76 if (!(srid ||
type || hasz || hasm) || typmod < 0)
79 PG_RETURN_CSTRING(str);
83 str += sprintf(str,
"(");
88 else if (srid || hasz || hasm)
89 str += sprintf(str,
"Geometry");
92 if (hasz) str += sprintf(str,
"%s",
"Z");
95 if (hasm) str += sprintf(str,
"%s",
"M");
98 if (srid) str += sprintf(str,
",%d", srid);
101 str += sprintf(str,
")");
103 PG_RETURN_CSTRING(
s);
#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)