226 if (ARR_ELEMTYPE(arr) != CSTRINGOID)
228 (errcode(ERRCODE_ARRAY_ELEMENT_ERROR),
229 errmsg(
"typmod array must be type cstring[]")));
231 if (ARR_NDIM(arr) != 1)
233 (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
234 errmsg(
"typmod array must be one-dimensional")));
236 if (ARR_HASNULL(arr))
238 (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
239 errmsg(
"typmod array must not contain nulls")));
241 deconstruct_array(arr,
242 CSTRINGOID, -2,
false,
'c',
243 &elem_values, NULL, &n);
251 for (i = 0; i < n; i++)
255 char *
s = DatumGetCString(elem_values[i]);
263 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
264 errmsg(
"Invalid geometry type modifier: %s", s)));
277 int srid = pg_atoi(DatumGetCString(elem_values[i]),
278 sizeof(
int32),
'\0');
280 POSTGIS_DEBUGF(3,
"srid: %d", srid);
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_Z(typmod)
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_M(typmod)
#define SRID_UNKNOWN
Unknown SRID value.
#define TYPMOD_SET_TYPE(typmod, type)
#define TYPMOD_SET_SRID(typmod, srid)