How spatial dimensions work

As well as having distinct properties of its own, each of the geometry subtypes inherits properties from the ST_Geometry supertype. A geometry subtype has one of the following dimensional values:

The dimension of a geometry is not related to the number of coordinate dimensions of each point in a geometry.

A single ST_GeomCollection can contain geometries of different dimensions, and the highest dimension geometry is returned