void getMap( UDT_HANDLE *geometriesUdt, INTEGER *result, char sqlstate[6]) { attribute_info_t attributeInfo; int nullIndicator; int length; int bufSize = 0; void * tmpBuf = 0; /* Get the attribute information for the first attribute. */ FNC_GetStructuredAttributeInfo(*geometriesUdt, 0, sizeof(attribute_info_t), &attributeInfo); /* Get the value of the first attribute. */ bufSize = attributeInfo.max_length; tmpBuf = FNC_malloc(bufSize); FNC_GetStructuredAttributeByNdx(*geometriesUdt, 0, tmpBuf, bufSize, &nullIndicator, &length); ... }