PostGIS  2.3.7dev-r@@SVN_REVISION@@
Datum postgis_typmod_dims ( PG_FUNCTION_ARGS  )

Definition at line 399 of file gserialized_typmod.c.

References TYPMOD_GET_M, and TYPMOD_GET_Z.

400 {
401  int32 typmod = PG_GETARG_INT32(0);
402  int32 dims = 2;
403  if ( typmod < 0 )
404  PG_RETURN_NULL(); /* unconstrained */
405  if ( TYPMOD_GET_Z(typmod) )
406  dims++;
407  if ( TYPMOD_GET_M(typmod) )
408  dims++;
409  PG_RETURN_INT32(dims);
410 }
unsigned int int32
Definition: shpopen.c:273
#define TYPMOD_GET_M(typmod)
Definition: liblwgeom.h:170
#define TYPMOD_GET_Z(typmod)
Definition: liblwgeom.h:168