65 char *
s = (
char*)palloc(64);
67 uint32 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 ) )
79 PG_RETURN_CSTRING(str);
83 str += sprintf(str,
"(");
88 else if ( (!type) && ( srid || hasz || hasm ) )
89 str += sprintf(str,
"Geometry");
93 str += sprintf(str,
"%s",
"Z");
97 str += sprintf(str,
"%s",
"M");
101 str += sprintf(str,
",");
105 str += sprintf(str,
"%d", srid);
108 str += sprintf(str,
")");
110 PG_RETURN_CSTRING(s);
#define TYPMOD_GET_TYPE(typmod)
#define TYPMOD_GET_M(typmod)
#define TYPMOD_GET_SRID(typmod)
Macros for manipulating the 'typemod' int.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define TYPMOD_GET_Z(typmod)