Database Reference
In-Depth Information
The cube extension
This extension provides a cube data type for representing multidimensional cubes.
Let's discuss the various cube functions:
cube : This creates a cube with speciied dimensions. This can be explained
using the following example:
warehouse_db=# SELECT cube(10,10);
cube
------
(10)
(1 row)
cube_dim : This gets the dimension of the cube. This can be explained using
the following example:
warehouse_db=# SELECT cube_dim(cube(5,5));
cube_dim
----------
1
(1 row)
cube_ll_coord : This is used to get the nth coordinate value for the lower-left
corner of cube. This can be explained using the following example:
warehouse_db=# SELECT cube_ll_coord(cube(5,5), 1);
cube_ll_coord
---------------
5
(1 row)
cube_ur_coord : This gets the nth coordinate value for the upper-right corner
of the cube. This can be explained using the following example:
warehouse_db=# SELECT cube_ur_coord(cube(5,5), 1);
cube_ur_coord
---------------
5
(1 row)
cube_is_point : This is used to check whether the cube is a point. This can
be explained using the following example:
warehouse_db=# SELECT cube_ur_coord (cube (5,5), 1);
cube_ur_coord
---------------
5
(1 row)
 
Search WWH ::




Custom Search