cube
data type for multidimensional cubes
cube : data type for multidimensional cubes
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3950 | cube | cube | 1.5 |
TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-dt- | No | Yes | No | Yes | no | yes |
| Relationships | |
|---|---|
| Need By | earthdistance pg4ml |
| See Also | seg prefix unit ip4r pgmp numeral pg_rational uint uint128 ltree |
Packages
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.5 | 1.5 | 1.5 | 1.5 | 1.5 |
This is a built-in contrib extension ship with the PostgreSQL kernel
Install
Create this extension with:
Usage
The cube extension provides a data type for representing multi-dimensional cubes (up to 100 dimensions).
Input Formats
Operators
| Operator | Description |
|---|---|
&& |
Overlaps |
@> |
Contains |
<@ |
Contained in |
-> |
Extract n-th coordinate |
<-> |
Euclidean distance |
<#> |
Taxicab (L-1) distance |
<=> |
Chebyshev (L-inf) distance |
Functions
GiST Index with KNN Search
Dimension Handling
When operating on cubes of different dimensions, the lower-dimensional cube is treated as having zeroes for missing coordinates.