Returns the dimension of the ST_Geometry value. Points have dimension 0, lines have dimension 1, and surfaces have dimension 2. Any empty geometry has dimension -1.
SELECT NEW ST_Point(1.0,1.0).ST_Dimension()
The following example returns the result 1.
SELECT NEW ST_LineString('LineString( 0 0, 1 1)' ).ST_Dimension()
SQL/MM (ISO/IEC 13249-3: 2006) 5.1.2