]> begriffs open source - ai-pg/blob - full-docs/html/cube.html
Include latest toc output
[ai-pg] / full-docs / html / cube.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>F.10. cube — a multi-dimensional cube data type</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="citext.html" title="F.9. citext — a case-insensitive character string type" /><link rel="next" href="dblink.html" title="F.11. dblink — connect to other PostgreSQL databases" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">F.10. cube — a multi-dimensional cube data type</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="citext.html" title="F.9. citext — a case-insensitive character string type">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="contrib.html" title="Appendix F. Additional Supplied Modules and Extensions">Up</a></td><th width="60%" align="center">Appendix F. Additional Supplied Modules and Extensions</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="dblink.html" title="F.11. dblink — connect to other PostgreSQL databases">Next</a></td></tr></table><hr /></div><div class="sect1" id="CUBE"><div class="titlepage"><div><div><h2 class="title" style="clear: both">F.10. cube — a multi-dimensional cube data type <a href="#CUBE" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="cube.html#CUBE-SYNTAX">F.10.1. Syntax</a></span></dt><dt><span class="sect2"><a href="cube.html#CUBE-PRECISION">F.10.2. Precision</a></span></dt><dt><span class="sect2"><a href="cube.html#CUBE-USAGE">F.10.3. Usage</a></span></dt><dt><span class="sect2"><a href="cube.html#CUBE-DEFAULTS">F.10.4. Defaults</a></span></dt><dt><span class="sect2"><a href="cube.html#CUBE-NOTES">F.10.5. Notes</a></span></dt><dt><span class="sect2"><a href="cube.html#CUBE-CREDITS">F.10.6. Credits</a></span></dt></dl></div><a id="id-1.11.7.20.2" class="indexterm"></a><p>
3   This module implements a data type <code class="type">cube</code> for
4   representing multidimensional cubes.
5  </p><p>
6   This module is considered <span class="quote">“<span class="quote">trusted</span>”</span>, that is, it can be
7   installed by non-superusers who have <code class="literal">CREATE</code> privilege
8   on the current database.
9  </p><div class="sect2" id="CUBE-SYNTAX"><div class="titlepage"><div><div><h3 class="title">F.10.1. Syntax <a href="#CUBE-SYNTAX" class="id_link">#</a></h3></div></div></div><p>
10    <a class="xref" href="cube.html#CUBE-REPR-TABLE" title="Table F.1. Cube External Representations">Table F.1</a> shows the valid external
11    representations for the <code class="type">cube</code>
12    type.  <em class="replaceable"><code>x</code></em>, <em class="replaceable"><code>y</code></em>, etc. denote
13    floating-point numbers.
14   </p><div class="table" id="CUBE-REPR-TABLE"><p class="title"><strong>Table F.1. Cube External Representations</strong></p><div class="table-contents"><table class="table" summary="Cube External Representations" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>External Syntax</th><th>Meaning</th></tr></thead><tbody><tr><td><code class="literal"><em class="replaceable"><code>x</code></em></code></td><td>A one-dimensional point
15        (or, zero-length one-dimensional interval)
16       </td></tr><tr><td><code class="literal">(<em class="replaceable"><code>x</code></em>)</code></td><td>Same as above</td></tr><tr><td><code class="literal"><em class="replaceable"><code>x1</code></em>,<em class="replaceable"><code>x2</code></em>,...,<em class="replaceable"><code>xn</code></em></code></td><td>A point in n-dimensional space, represented internally as a
17       zero-volume cube
18       </td></tr><tr><td><code class="literal">(<em class="replaceable"><code>x1</code></em>,<em class="replaceable"><code>x2</code></em>,...,<em class="replaceable"><code>xn</code></em>)</code></td><td>Same as above</td></tr><tr><td><code class="literal">(<em class="replaceable"><code>x</code></em>),(<em class="replaceable"><code>y</code></em>)</code></td><td>A one-dimensional interval starting at <em class="replaceable"><code>x</code></em> and ending at <em class="replaceable"><code>y</code></em> or vice versa; the
19        order does not matter
20       </td></tr><tr><td><code class="literal">[(<em class="replaceable"><code>x</code></em>),(<em class="replaceable"><code>y</code></em>)]</code></td><td>Same as above</td></tr><tr><td><code class="literal">(<em class="replaceable"><code>x1</code></em>,...,<em class="replaceable"><code>xn</code></em>),(<em class="replaceable"><code>y1</code></em>,...,<em class="replaceable"><code>yn</code></em>)</code></td><td>An n-dimensional cube represented by a pair of its diagonally
21        opposite corners
22       </td></tr><tr><td><code class="literal">[(<em class="replaceable"><code>x1</code></em>,...,<em class="replaceable"><code>xn</code></em>),(<em class="replaceable"><code>y1</code></em>,...,<em class="replaceable"><code>yn</code></em>)]</code></td><td>Same as above</td></tr></tbody></table></div></div><br class="table-break" /><p>
23    It does not matter which order the opposite corners of a cube are
24    entered in.  The <code class="type">cube</code> functions
25    automatically swap values if needed to create a uniform
26    <span class="quote">“<span class="quote">lower left — upper right</span>”</span> internal representation.
27    When the corners coincide, <code class="type">cube</code> stores only one corner
28    along with an <span class="quote">“<span class="quote">is point</span>”</span> flag to avoid wasting space.
29   </p><p>
30    White space is ignored on input, so
31    <code class="literal">[(<em class="replaceable"><code>x</code></em>),(<em class="replaceable"><code>y</code></em>)]</code> is the same as
32    <code class="literal">[ ( <em class="replaceable"><code>x</code></em> ), ( <em class="replaceable"><code>y</code></em> ) ]</code>.
33   </p></div><div class="sect2" id="CUBE-PRECISION"><div class="titlepage"><div><div><h3 class="title">F.10.2. Precision <a href="#CUBE-PRECISION" class="id_link">#</a></h3></div></div></div><p>
34    Values are stored internally as 64-bit floating point numbers. This means
35    that numbers with more than about 16 significant digits will be truncated.
36   </p></div><div class="sect2" id="CUBE-USAGE"><div class="titlepage"><div><div><h3 class="title">F.10.3. Usage <a href="#CUBE-USAGE" class="id_link">#</a></h3></div></div></div><p>
37    <a class="xref" href="cube.html#CUBE-OPERATORS-TABLE" title="Table F.2. Cube Operators">Table F.2</a> shows the specialized operators
38    provided for type <code class="type">cube</code>.
39   </p><div class="table" id="CUBE-OPERATORS-TABLE"><p class="title"><strong>Table F.2. Cube Operators</strong></p><div class="table-contents"><table class="table" summary="Cube Operators" border="1"><colgroup><col /></colgroup><thead><tr><th class="func_table_entry"><p class="func_signature">
40         Operator
41        </p>
42        <p>
43         Description
44        </p></th></tr></thead><tbody><tr><td class="func_table_entry"><p class="func_signature">
45         <code class="type">cube</code> <code class="literal">&amp;&amp;</code> <code class="type">cube</code>
46         → <code class="returnvalue">boolean</code>
47        </p>
48        <p>
49         Do the cubes overlap?
50        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
51         <code class="type">cube</code> <code class="literal">@&gt;</code> <code class="type">cube</code>
52         → <code class="returnvalue">boolean</code>
53        </p>
54        <p>
55         Does the first cube contain the second?
56        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
57         <code class="type">cube</code> <code class="literal">&lt;@</code> <code class="type">cube</code>
58         → <code class="returnvalue">boolean</code>
59        </p>
60        <p>
61         Is the first cube contained in the second?
62        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
63         <code class="type">cube</code> <code class="literal">-&gt;</code> <code class="type">integer</code>
64         → <code class="returnvalue">float8</code>
65        </p>
66        <p>
67         Extracts the <em class="parameter"><code>n</code></em>-th coordinate of the cube
68         (counting from 1).
69        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
70         <code class="type">cube</code> <code class="literal">~&gt;</code> <code class="type">integer</code>
71         → <code class="returnvalue">float8</code>
72        </p>
73        <p>
74         Extracts the <em class="parameter"><code>n</code></em>-th coordinate of the cube,
75         counting in the following way: <em class="parameter"><code>n</code></em> = 2
76         * <em class="parameter"><code>k</code></em> - 1 means lower bound
77         of <em class="parameter"><code>k</code></em>-th dimension, <em class="parameter"><code>n</code></em> = 2
78         * <em class="parameter"><code>k</code></em> means upper bound of
79         <em class="parameter"><code>k</code></em>-th dimension.  Negative
80         <em class="parameter"><code>n</code></em> denotes the inverse value of the corresponding
81         positive coordinate.  This operator is designed for KNN-GiST support.
82        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
83         <code class="type">cube</code> <code class="literal">&lt;-&gt;</code> <code class="type">cube</code>
84         → <code class="returnvalue">float8</code>
85        </p>
86        <p>
87         Computes the Euclidean distance between the two cubes.
88        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
89         <code class="type">cube</code> <code class="literal">&lt;#&gt;</code> <code class="type">cube</code>
90         → <code class="returnvalue">float8</code>
91        </p>
92        <p>
93         Computes the taxicab (L-1 metric) distance between the two cubes.
94        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
95         <code class="type">cube</code> <code class="literal">&lt;=&gt;</code> <code class="type">cube</code>
96         → <code class="returnvalue">float8</code>
97        </p>
98        <p>
99         Computes the Chebyshev (L-inf metric) distance between the two cubes.
100        </p></td></tr></tbody></table></div></div><br class="table-break" /><p>
101    In addition to the above operators, the usual comparison
102    operators shown in <a class="xref" href="functions-comparison.html#FUNCTIONS-COMPARISON-OP-TABLE" title="Table 9.1. Comparison Operators">Table 9.1</a> are
103    available for type <code class="type">cube</code>.  These
104    operators first compare the first coordinates, and if those are equal,
105    compare the second coordinates, etc.  They exist mainly to support the
106    b-tree index operator class for <code class="type">cube</code>, which can be useful for
107    example if you would like a UNIQUE constraint on a <code class="type">cube</code> column.
108    Otherwise, this ordering is not of much practical use.
109   </p><p>
110    The <code class="filename">cube</code> module also provides a GiST index operator class for
111    <code class="type">cube</code> values.
112    A <code class="type">cube</code> GiST index can be used to search for values using the
113    <code class="literal">=</code>, <code class="literal">&amp;&amp;</code>, <code class="literal">@&gt;</code>, and
114    <code class="literal">&lt;@</code> operators in <code class="literal">WHERE</code> clauses.
115   </p><p>
116    In addition, a <code class="type">cube</code> GiST index can be used to find nearest
117    neighbors using the metric operators
118    <code class="literal">&lt;-&gt;</code>, <code class="literal">&lt;#&gt;</code>, and
119    <code class="literal">&lt;=&gt;</code> in <code class="literal">ORDER BY</code> clauses.
120    For example, the nearest neighbor of the 3-D point (0.5, 0.5, 0.5)
121    could be found efficiently with:
122 </p><pre class="programlisting">
123 SELECT c FROM test ORDER BY c &lt;-&gt; cube(array[0.5,0.5,0.5]) LIMIT 1;
124 </pre><p>
125   </p><p>
126    The <code class="literal">~&gt;</code> operator can also be used in this way to
127    efficiently retrieve the first few values sorted by a selected coordinate.
128    For example, to get the first few cubes ordered by the first coordinate
129    (lower left corner) ascending one could use the following query:
130 </p><pre class="programlisting">
131 SELECT c FROM test ORDER BY c ~&gt; 1 LIMIT 5;
132 </pre><p>
133    And to get 2-D cubes ordered by the first coordinate of the upper right
134    corner descending:
135 </p><pre class="programlisting">
136 SELECT c FROM test ORDER BY c ~&gt; 3 DESC LIMIT 5;
137 </pre><p>
138   </p><p>
139    <a class="xref" href="cube.html#CUBE-FUNCTIONS-TABLE" title="Table F.3. Cube Functions">Table F.3</a> shows the available functions.
140   </p><div class="table" id="CUBE-FUNCTIONS-TABLE"><p class="title"><strong>Table F.3. Cube Functions</strong></p><div class="table-contents"><table class="table" summary="Cube Functions" border="1"><colgroup><col /></colgroup><thead><tr><th class="func_table_entry"><p class="func_signature">
141         Function
142        </p>
143        <p>
144         Description
145        </p>
146        <p>
147         Example(s)
148        </p></th></tr></thead><tbody><tr><td class="func_table_entry"><p class="func_signature">
149         <code class="function">cube</code> ( <code class="type">float8</code> )
150         → <code class="returnvalue">cube</code>
151        </p>
152        <p>
153         Makes a one dimensional cube with both coordinates the same.
154        </p>
155        <p>
156         <code class="literal">cube(1)</code>
157         → <code class="returnvalue">(1)</code>
158        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
159         <code class="function">cube</code> ( <code class="type">float8</code>, <code class="type">float8</code> )
160         → <code class="returnvalue">cube</code>
161        </p>
162        <p>
163         Makes a one dimensional cube.
164        </p>
165        <p>
166         <code class="literal">cube(1, 2)</code>
167         → <code class="returnvalue">(1),(2)</code>
168        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
169         <code class="function">cube</code> ( <code class="type">float8[]</code> )
170         → <code class="returnvalue">cube</code>
171        </p>
172        <p>
173         Makes a zero-volume cube using the coordinates defined by the array.
174        </p>
175        <p>
176         <code class="literal">cube(ARRAY[1,2,3])</code>
177         → <code class="returnvalue">(1, 2, 3)</code>
178        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
179         <code class="function">cube</code> ( <code class="type">float8[]</code>, <code class="type">float8[]</code> )
180         → <code class="returnvalue">cube</code>
181        </p>
182        <p>
183         Makes a cube with upper right and lower left coordinates as defined by
184         the two arrays, which must be of the same length.
185        </p>
186        <p>
187         <code class="literal">cube(ARRAY[1,2], ARRAY[3,4])</code>
188         → <code class="returnvalue">(1, 2),(3, 4)</code>
189        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
190         <code class="function">cube</code> ( <code class="type">cube</code>, <code class="type">float8</code> )
191         → <code class="returnvalue">cube</code>
192        </p>
193        <p>
194         Makes a new cube by adding a dimension on to an existing cube,
195         with the same values for both endpoints of the new coordinate.  This
196         is useful for building cubes piece by piece from calculated values.
197        </p>
198        <p>
199         <code class="literal">cube('(1,2),(3,4)'::cube, 5)</code>
200         → <code class="returnvalue">(1, 2, 5),(3, 4, 5)</code>
201        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
202         <code class="function">cube</code> ( <code class="type">cube</code>, <code class="type">float8</code>, <code class="type">float8</code> )
203         → <code class="returnvalue">cube</code>
204        </p>
205        <p>
206         Makes a new cube by adding a dimension on to an existing cube. This is
207         useful for building cubes piece by piece from calculated values.
208        </p>
209        <p>
210         <code class="literal">cube('(1,2),(3,4)'::cube, 5, 6)</code>
211         → <code class="returnvalue">(1, 2, 5),(3, 4, 6)</code>
212        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
213         <code class="function">cube_dim</code> ( <code class="type">cube</code> )
214         → <code class="returnvalue">integer</code>
215        </p>
216        <p>
217         Returns the number of dimensions of the cube.
218        </p>
219        <p>
220         <code class="literal">cube_dim('(1,2),(3,4)')</code>
221         → <code class="returnvalue">2</code>
222        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
223         <code class="function">cube_ll_coord</code> ( <code class="type">cube</code>, <code class="type">integer</code> )
224         → <code class="returnvalue">float8</code>
225        </p>
226        <p>
227         Returns the <em class="parameter"><code>n</code></em>-th coordinate value for the lower
228         left corner of the cube.
229        </p>
230        <p>
231         <code class="literal">cube_ll_coord('(1,2),(3,4)', 2)</code>
232         → <code class="returnvalue">2</code>
233        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
234         <code class="function">cube_ur_coord</code> ( <code class="type">cube</code>, <code class="type">integer</code> )
235         → <code class="returnvalue">float8</code>
236        </p>
237        <p>
238         Returns the <em class="parameter"><code>n</code></em>-th coordinate value for the
239         upper right corner of the cube.
240        </p>
241        <p>
242         <code class="literal">cube_ur_coord('(1,2),(3,4)', 2)</code>
243         → <code class="returnvalue">4</code>
244        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
245         <code class="function">cube_is_point</code> ( <code class="type">cube</code> )
246         → <code class="returnvalue">boolean</code>
247        </p>
248        <p>
249         Returns true if the cube is a point, that is,
250         the two defining corners are the same.
251        </p>
252        <p>
253         <code class="literal">cube_is_point(cube(1,1))</code>
254         → <code class="returnvalue">t</code>
255        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
256         <code class="function">cube_distance</code> ( <code class="type">cube</code>, <code class="type">cube</code> )
257         → <code class="returnvalue">float8</code>
258        </p>
259        <p>
260         Returns the distance between two cubes. If both
261         cubes are points, this is the normal distance function.
262        </p>
263        <p>
264         <code class="literal">cube_distance('(1,2)', '(3,4)')</code>
265         → <code class="returnvalue">2.8284271247461903</code>
266        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
267         <code class="function">cube_subset</code> ( <code class="type">cube</code>, <code class="type">integer[]</code> )
268         → <code class="returnvalue">cube</code>
269        </p>
270        <p>
271         Makes a new cube from an existing cube, using a list of
272         dimension indexes from an array. Can be used to extract the endpoints
273         of a single dimension, or to drop dimensions, or to reorder them as
274         desired.
275        </p>
276        <p>
277         <code class="literal">cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[2])</code>
278         → <code class="returnvalue">(3),(7)</code>
279        </p>
280        <p>
281         <code class="literal">cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1])</code>
282         → <code class="returnvalue">(5, 3, 1, 1),(8, 7, 6, 6)</code>
283        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
284         <code class="function">cube_union</code> ( <code class="type">cube</code>, <code class="type">cube</code> )
285         → <code class="returnvalue">cube</code>
286        </p>
287        <p>
288         Produces the union of two cubes.
289        </p>
290        <p>
291         <code class="literal">cube_union('(1,2)', '(3,4)')</code>
292         → <code class="returnvalue">(1, 2),(3, 4)</code>
293        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
294         <code class="function">cube_inter</code> ( <code class="type">cube</code>, <code class="type">cube</code> )
295         → <code class="returnvalue">cube</code>
296        </p>
297        <p>
298         Produces the intersection of two cubes.
299        </p>
300        <p>
301         <code class="literal">cube_inter('(1,2)', '(3,4)')</code>
302         → <code class="returnvalue">(3, 4),(1, 2)</code>
303        </p></td></tr><tr><td class="func_table_entry"><p class="func_signature">
304         <code class="function">cube_enlarge</code> ( <em class="parameter"><code>c</code></em> <code class="type">cube</code>, <em class="parameter"><code>r</code></em> <code class="type">double</code>, <em class="parameter"><code>n</code></em> <code class="type">integer</code> )
305         → <code class="returnvalue">cube</code>
306        </p>
307        <p>
308         Increases the size of the cube by the specified
309         radius <em class="parameter"><code>r</code></em> in at least <em class="parameter"><code>n</code></em>
310         dimensions.  If the radius is negative the cube is shrunk instead.
311         All defined dimensions are changed by the
312         radius <em class="parameter"><code>r</code></em>.  Lower-left coordinates are decreased
313         by <em class="parameter"><code>r</code></em> and upper-right coordinates are increased
314         by <em class="parameter"><code>r</code></em>.  If a lower-left coordinate is increased
315         to more than the corresponding upper-right coordinate (this can only
316         happen when <em class="parameter"><code>r</code></em> &lt; 0) than both coordinates are
317         set to their average.  If <em class="parameter"><code>n</code></em> is greater than the
318         number of defined dimensions and the cube is being enlarged
319         (<em class="parameter"><code>r</code></em> &gt; 0), then extra dimensions are added to
320         make <em class="parameter"><code>n</code></em> altogether; 0 is used as the initial
321         value for the extra coordinates.  This function is useful for creating
322         bounding boxes around a point for searching for nearby points.
323        </p>
324        <p>
325         <code class="literal">cube_enlarge('(1,2),(3,4)', 0.5, 3)</code>
326         → <code class="returnvalue">(0.5, 1.5, -0.5),(3.5, 4.5, 0.5)</code>
327        </p></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" id="CUBE-DEFAULTS"><div class="titlepage"><div><div><h3 class="title">F.10.4. Defaults <a href="#CUBE-DEFAULTS" class="id_link">#</a></h3></div></div></div><p>
328    This union:
329   </p><pre class="programlisting">
330 select cube_union('(0,5,2),(2,3,1)', '0');
331 cube_union
332 -------------------
333 (0, 0, 0),(2, 5, 2)
334 (1 row)
335 </pre><p>
336     does not contradict common sense, neither does the intersection:
337    </p><pre class="programlisting">
338 select cube_inter('(0,-1),(1,1)', '(-2),(2)');
339 cube_inter
340 -------------
341 (0, 0),(1, 0)
342 (1 row)
343 </pre><p>
344     In all binary operations on differently-dimensioned cubes,
345     the lower-dimensional one is assumed to be a Cartesian projection, i. e., having zeroes
346     in place of coordinates omitted in the string representation. The above
347     examples are equivalent to:
348    </p><pre class="programlisting">
349 cube_union('(0,5,2),(2,3,1)','(0,0,0),(0,0,0)');
350 cube_inter('(0,-1),(1,1)','(-2,0),(2,0)');
351 </pre><p>
352     The following containment predicate uses the point syntax,
353     while in fact the second argument is internally represented by a box.
354     This syntax makes it unnecessary to define a separate point type
355     and functions for (box,point) predicates.
356    </p><pre class="programlisting">
357 select cube_contains('(0,0),(1,1)', '0.5,0.5');
358 cube_contains
359 --------------
360 t
361 (1 row)
362 </pre></div><div class="sect2" id="CUBE-NOTES"><div class="titlepage"><div><div><h3 class="title">F.10.5. Notes <a href="#CUBE-NOTES" class="id_link">#</a></h3></div></div></div><p>
363    For examples of usage, see the regression test <code class="filename">sql/cube.sql</code>.
364   </p><p>
365    To make it harder for people to break things, there
366    is a limit of 100 on the number of dimensions of cubes. This is set
367    in <code class="filename">cubedata.h</code> if you need something bigger.
368   </p></div><div class="sect2" id="CUBE-CREDITS"><div class="titlepage"><div><div><h3 class="title">F.10.6. Credits <a href="#CUBE-CREDITS" class="id_link">#</a></h3></div></div></div><p>
369    Original author: Gene Selkov, Jr. <code class="email">&lt;<a class="email" href="mailto:selkovjr@mcs.anl.gov">selkovjr@mcs.anl.gov</a>&gt;</code>,
370    Mathematics and Computer Science Division, Argonne National Laboratory.
371   </p><p>
372    My thanks are primarily to Prof. Joe Hellerstein
373    (<a class="ulink" href="https://dsf.berkeley.edu/jmh/" target="_top">https://dsf.berkeley.edu/jmh/</a>) for elucidating the
374    gist of the GiST (<a class="ulink" href="http://gist.cs.berkeley.edu/" target="_top">http://gist.cs.berkeley.edu/</a>), and
375    to his former student Andy Dong for his example written for Illustra.
376    I am also grateful to all Postgres developers, present and past, for
377    enabling myself to create my own world and live undisturbed in it. And I
378    would like to acknowledge my gratitude to Argonne Lab and to the
379    U.S. Department of Energy for the years of faithful support of my database
380    research.
381   </p><p>
382    Minor updates to this package were made by Bruno Wolff III
383    <code class="email">&lt;<a class="email" href="mailto:bruno@wolff.to">bruno@wolff.to</a>&gt;</code> in August/September of 2002. These include
384    changing the precision from single precision to double precision and adding
385    some new functions.
386   </p><p>
387    Additional updates were made by Joshua Reich <code class="email">&lt;<a class="email" href="mailto:josh@root.net">josh@root.net</a>&gt;</code> in
388    July 2006. These include <code class="literal">cube(float8[], float8[])</code> and
389    cleaning up the code to use the V1 call protocol instead of the deprecated
390    V0 protocol.
391   </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="citext.html" title="F.9. citext — a case-insensitive character string type">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="contrib.html" title="Appendix F. Additional Supplied Modules and Extensions">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dblink.html" title="F.11. dblink — connect to other PostgreSQL databases">Next</a></td></tr><tr><td width="40%" align="left" valign="top">F.9. citext — a case-insensitive character string type </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> F.11. dblink — connect to other PostgreSQL databases</td></tr></table></div></body></html>