219 if (ARR_ELEMTYPE(arr) != CSTRINGOID)
221 (errcode(ERRCODE_ARRAY_ELEMENT_ERROR),
222 errmsg(
"typmod array must be type cstring[]")));
224 if (ARR_NDIM(arr) != 1)
226 (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
227 errmsg(
"typmod array must be one-dimensional")));
229 if (ARR_HASNULL(arr))
231 (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
232 errmsg(
"typmod array must not contain nulls")));
234 deconstruct_array(arr,
235 CSTRINGOID, -2,
false,
'c',
236 &elem_values, NULL, &n);
244 for (i = 0; i < n; i++)
248 char *
s = DatumGetCString(elem_values[i]);
256 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
257 errmsg(
"Invalid geometry type modifier: %s",
s)));
270 int srid = pg_atoi(DatumGetCString(elem_values[i]),
271 sizeof(
int32),
'\0');
273 POSTGIS_DEBUGF(3,
"srid: %d", srid);
int geometry_type_from_string(const char *str, uint8_t *type, int *z, int *m)
Calculate type integer and dimensional flags from string input.
#define TYPMOD_SET_SRID(typmod, srid)
#define TYPMOD_SET_TYPE(typmod, type)
int clamp_srid(int srid)
Return a valid SRID from an arbitrary integer Raises a notice if what comes out is different from wha...
#define TYPMOD_SET_M(typmod)
#define SRID_UNKNOWN
Unknown SRID value.
#define TYPMOD_SET_Z(typmod)