217 if (ARR_ELEMTYPE(arr) != CSTRINGOID)
219 (errcode(ERRCODE_ARRAY_ELEMENT_ERROR),
220 errmsg(
"typmod array must be type cstring[]")));
222 if (ARR_NDIM(arr) != 1)
224 (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
225 errmsg(
"typmod array must be one-dimensional")));
227 if (ARR_HASNULL(arr))
229 (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
230 errmsg(
"typmod array must not contain nulls")));
232 deconstruct_array(arr,
233 CSTRINGOID, -2,
false,
'c',
234 &elem_values, NULL, &n);
242 for (i = 0; i < n; i++)
246 char *
s = DatumGetCString(elem_values[i]);
254 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
255 errmsg(
"Invalid geometry type modifier: %s",
s)));
268 int32_t srid = pg_atoi(DatumGetCString(elem_values[i]),
sizeof(
int32),
'\0');
270 POSTGIS_DEBUGF(3,
"srid: %d", srid);
#define TYPMOD_SET_SRID(typmod, srid)
int geometry_type_from_string(const char *str, uint8_t *type, int *z, int *m)
Utility function to get type number from string.
#define TYPMOD_SET_TYPE(typmod, type)
#define TYPMOD_SET_M(typmod)
#define SRID_UNKNOWN
Unknown SRID value.
#define TYPMOD_SET_Z(typmod)
int32_t clamp_srid(int32_t srid)
Return a valid SRID from an arbitrary integer Raises a notice if what comes out is different from wha...