PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ postgis_typmod_dims()

Datum postgis_typmod_dims ( PG_FUNCTION_ARGS  )

Definition at line 392 of file gserialized_typmod.c.

393 {
394  int32 typmod = PG_GETARG_INT32(0);
395  int32 dims = 2;
396  if ( typmod < 0 )
397  PG_RETURN_NULL(); /* unconstrained */
398  if ( TYPMOD_GET_Z(typmod) )
399  dims++;
400  if ( TYPMOD_GET_M(typmod) )
401  dims++;
402  PG_RETURN_INT32(dims);
403 }
#define TYPMOD_GET_M(typmod)
Definition: liblwgeom.h:171
#define TYPMOD_GET_Z(typmod)
Definition: liblwgeom.h:169
unsigned int int32
Definition: shpopen.c:273

References TYPMOD_GET_M, and TYPMOD_GET_Z.