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

Definition at line 383 of file gserialized_typmod.c.

References TYPMOD_GET_M, and TYPMOD_GET_Z.

384 {
385  int32 typmod = PG_GETARG_INT32(0);
386  int32 dims = 2;
387  if ( typmod < 0 )
388  PG_RETURN_NULL(); /* unconstrained */
389  if ( TYPMOD_GET_Z(typmod) )
390  dims++;
391  if ( TYPMOD_GET_M(typmod) )
392  dims++;
393  PG_RETURN_INT32(dims);
394 }
#define TYPMOD_GET_M(typmod)
Definition: liblwgeom.h:137
#define TYPMOD_GET_Z(typmod)
Definition: liblwgeom.h:135