PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ postgis_typmod_dims()

Datum postgis_typmod_dims ( PG_FUNCTION_ARGS  )

Definition at line 421 of file gserialized_typmod.c.

422 {
423  int32 typmod = PG_GETARG_INT32(0);
424  int32 dims = 2;
425  if ( typmod < 0 )
426  PG_RETURN_NULL(); /* unconstrained */
427  if ( TYPMOD_GET_Z(typmod) )
428  dims++;
429  if ( TYPMOD_GET_M(typmod) )
430  dims++;
431  PG_RETURN_INT32(dims);
432 }
#define TYPMOD_GET_M(typmod)
Definition: liblwgeom.h:212
#define TYPMOD_GET_Z(typmod)
Definition: liblwgeom.h:210
unsigned int int32
Definition: shpopen.c:54

References TYPMOD_GET_M, and TYPMOD_GET_Z.