Commit 32784cdd authored by Bruce Momjian's avatar Bruce Momjian

The changes I have made are described in CHANGES. This was based on

diffs to 7.3-devel and may not be applicable to 7.2. I have included a
change covered by a previous bugfix patch I submitted (the problem with
-.1 not being accepted by cube_in). It does not include a fix for the
potential buffer overrun issue I reported for cube_yyerror in
cubeparse.y.


Bruno Wolff III
parent 6d27cfdd
......@@ -99,7 +99,7 @@ Tokens
n [0-9]+
integer [+-]?{n}
real [+-]?({n}\.{n}?)|(\.{n})
real [+-]?({n}\.{n}?|\.{n})
FLOAT ({integer}|{real})([eE]{integer})?
O_BRACKET \[
C_BRACKET \]
......@@ -182,8 +182,8 @@ t
PRECISION
=========
Values are stored internally as 32-bit floating point numbers. This means that
numbers with more than 7 significant digits will be truncated.
Values are stored internally as 64-bit floating point numbers. This means that
numbers with more than about 16 significant digits will be truncated.
USAGE
......@@ -253,6 +253,44 @@ Other operators:
reasonably good sorting in most cases, which is useful if
you want to use ORDER BY with this type
The following functions are available:
cube_distance(cube, cube) returns double
cube_distance returns the distance between two cubes. If both cubes are
points, this is the normal distance function.
cube(text) returns cube
cube takes text input and returns a cube. This is useful for making cubes
from computed strings.
cube_dim(cube) returns int
cube_dim returns the number of dimensions stored in the the data structure
for a cube. This is useful for constraints on the dimensions of a cube.
cube_ll_coord(cube, int) returns double
cube_ll_coord returns the nth coordinate value for the lower left corner
of a cube. This is useful for doing coordinate transformations.
cube_ur_coord(cube, int) returns double
cube_ur_coord returns the nth coordinate value for the upper right corner
of a cube. This is useful for doing coordinate transformations.
cube_is_point(cube) returns bool
cube_is_point returns true if a cube is also a point. This is true when the
two defining corners are the same.
cube_enlarge(cube, double, int) returns cube
cube_enlarge increases the size of a cube by a specified radius in at least
n dimensions. If the radius is negative the box is shrunk instead. This
is useful for creating bounding boxes around a point for searching for
nearby points. All defined dimensions are changed by the radius. If n
is greater than the number of defined dimensions and the cube is being
increased (r >= 0) then 0 is used as the base for the extra coordinates.
LL coordinates are decreased by r and UR coordinates are increased by r. If
a LL coordinate is increased to larger than the corresponding UR coordinate
(this can only happen when r < 0) than both coordinates are set to their
average.
There are a few other potentially useful functions defined in cube.c
that vanished from the schema because I stopped using them. Some of
these were meant to support type casting. Let me know if I was wrong:
......@@ -287,3 +325,11 @@ Building 221
Argonne, IL 60439-4844
selkovjr@mcs.anl.gov
------------------------------------------------------------------------
Minor updates to this package were made by Bruno Wolff III <bruno@wolff.to>
in August of 2002.
These include changing the precision from single precision to double
precision and adding some new functions.
This diff is collapsed.
......@@ -8,12 +8,12 @@ SET search_path = public;
CREATE FUNCTION cube_in(cstring)
RETURNS cube
AS 'MODULE_PATHNAME'
LANGUAGE 'c' WITH (isStrict);
LANGUAGE 'c'IMMUTABLE STRICT;
CREATE FUNCTION cube_out(cube)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE 'c' WITH (isStrict);
LANGUAGE 'c'IMMUTABLE STRICT;
CREATE TYPE cube (
internallength = variable,
......@@ -24,6 +24,16 @@ output = cube_out
COMMENT ON TYPE cube IS
'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)''';
-- Convert from text to cube
CREATE FUNCTION cube(text)
RETURNS cube
AS 'MODULE_PATHNAME'
LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube(text) IS
'convert text to cube';
--
-- External C-functions for R-tree methods
--
......@@ -31,25 +41,25 @@ COMMENT ON TYPE cube IS
-- Left/Right methods
CREATE FUNCTION cube_over_left(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_over_left(cube, cube) IS
'is over and left of (NOT IMPLEMENTED)';
CREATE FUNCTION cube_over_right(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_over_right(cube, cube) IS
'is over and right of (NOT IMPLEMENTED)';
CREATE FUNCTION cube_left(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_left(cube, cube) IS
'is left of (NOT IMPLEMENTED)';
CREATE FUNCTION cube_right(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_right(cube, cube) IS
'is right of (NOT IMPLEMENTED)';
......@@ -58,43 +68,43 @@ COMMENT ON FUNCTION cube_right(cube, cube) IS
-- Comparison methods
CREATE FUNCTION cube_lt(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_lt(cube, cube) IS
'lower than';
CREATE FUNCTION cube_gt(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_gt(cube, cube) IS
'greater than';
CREATE FUNCTION cube_contains(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_contains(cube, cube) IS
'contains';
CREATE FUNCTION cube_contained(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_contained(cube, cube) IS
'contained in';
CREATE FUNCTION cube_overlap(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_overlap(cube, cube) IS
'overlaps';
CREATE FUNCTION cube_same(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_same(cube, cube) IS
'same as';
CREATE FUNCTION cube_different(cube, cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
COMMENT ON FUNCTION cube_different(cube, cube) IS
'different';
......@@ -102,22 +112,42 @@ COMMENT ON FUNCTION cube_different(cube, cube) IS
-- support routines for indexing
CREATE FUNCTION cube_union(cube, cube) RETURNS cube
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
CREATE FUNCTION cube_inter(cube, cube) RETURNS cube
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
CREATE FUNCTION cube_size(cube) RETURNS float4
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
CREATE FUNCTION cube_size(cube) RETURNS float8
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
-- Misc N-dimensional functions
-- proximity routines
CREATE FUNCTION cube_distance(cube, cube) RETURNS float4
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
CREATE FUNCTION cube_distance(cube, cube) RETURNS float8
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
-- Extracting elements functions
CREATE FUNCTION cube_dim(cube) RETURNS int4
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
CREATE FUNCTION cube_ll_coord(cube, int4) RETURNS float8
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
CREATE FUNCTION cube_ur_coord(cube, int4) RETURNS float8
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
-- Test if cube is also a point
CREATE FUNCTION cube_is_point(cube) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
-- Increasing the size of a cube by a radius in at least n dimensions
CREATE FUNCTION cube_enlarge(cube, float8, int4) RETURNS cube
AS 'MODULE_PATHNAME' LANGUAGE 'c' IMMUTABLE STRICT;
--
-- OPERATORS
......@@ -202,7 +232,7 @@ CREATE FUNCTION g_cube_decompress(internal) RETURNS internal
AS 'MODULE_PATHNAME' LANGUAGE 'c';
CREATE FUNCTION g_cube_penalty(internal,internal,internal) RETURNS internal
AS 'MODULE_PATHNAME' LANGUAGE 'c' with (isstrict);
AS 'MODULE_PATHNAME' LANGUAGE 'c' STRICT;
CREATE FUNCTION g_cube_picksplit(internal, internal) RETURNS internal
AS 'MODULE_PATHNAME' LANGUAGE 'c';
......
......@@ -2,5 +2,5 @@ typedef struct NDBOX
{
unsigned int size; /* required to be a Postgres varlena type */
unsigned int dim;
float x[1];
double x[1];
} NDBOX;
......@@ -198,9 +198,10 @@ write_box(unsigned int dim, char *str1, char *str2)
NDBOX * bp;
char * s;
int i;
int size = offsetof(NDBOX, x[0]) + sizeof(float) * dim * 2;
int size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
bp = palloc(size);
memset(bp, 0, size);
bp->size = size;
bp->dim = dim;
......@@ -217,7 +218,7 @@ write_box(unsigned int dim, char *str1, char *str2)
s++; i++;
bp->x[i] = strtod(s, NULL);
}
return(bp);
}
......@@ -230,9 +231,10 @@ static NDBOX * write_point_as_box(char *str)
int dim = delim_count(str, ',') + 1;
char * s = str;
size = offsetof(NDBOX, x[0]) + sizeof(float) * dim * 2;
size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
bp = palloc(size);
memset(bp, 0, size);
bp->size = size;
bp->dim = dim;
......
......@@ -34,7 +34,7 @@ void cube_flush_scanner_buffer(void);
n [0-9]+
integer [+-]?{n}
real [+-]?({n}\.{n}?)|(\.{n})
real [+-]?({n}\.{n}?|\.{n})
float ({integer}|{real})([eE]{integer})?
%%
......
......@@ -43,7 +43,10 @@ SELECT '.1'::cube AS cube;
(1 row)
SELECT '-.1'::cube AS cube;
ERROR: parse error, expecting `FLOAT' or `O_PAREN' or `O_BRACKET' at or before position 2, character ('.', \056), input: '-.1'
cube
--------
(-0.1)
(1 row)
SELECT '1.0'::cube AS cube;
cube
......@@ -57,52 +60,52 @@ SELECT '-1.0'::cube AS cube;
(-1)
(1 row)
SELECT '1e7'::cube AS cube;
SELECT '1e27'::cube AS cube;
cube
---------
(1e+07)
(1e+27)
(1 row)
SELECT '-1e7'::cube AS cube;
SELECT '-1e27'::cube AS cube;
cube
----------
(-1e+07)
(-1e+27)
(1 row)
SELECT '1.0e7'::cube AS cube;
SELECT '1.0e27'::cube AS cube;
cube
---------
(1e+07)
(1e+27)
(1 row)
SELECT '-1.0e7'::cube AS cube;
SELECT '-1.0e27'::cube AS cube;
cube
----------
(-1e+07)
(-1e+27)
(1 row)
SELECT '1e+7'::cube AS cube;
SELECT '1e+27'::cube AS cube;
cube
---------
(1e+07)
(1e+27)
(1 row)
SELECT '-1e+7'::cube AS cube;
SELECT '-1e+27'::cube AS cube;
cube
----------
(-1e+07)
(-1e+27)
(1 row)
SELECT '1.0e+7'::cube AS cube;
SELECT '1.0e+27'::cube AS cube;
cube
---------
(1e+07)
(1e+27)
(1 row)
SELECT '-1.0e+7'::cube AS cube;
SELECT '-1.0e+27'::cube AS cube;
cube
----------
(-1e+07)
(-1e+27)
(1 row)
SELECT '1e-7'::cube AS cube;
......@@ -141,6 +144,42 @@ SELECT '-1e-700'::cube AS cube;
(0)
(1 row)
SELECT '1234567890123456'::cube AS cube;
cube
--------------------
(1234567890123456)
(1 row)
SELECT '+1234567890123456'::cube AS cube;
cube
--------------------
(1234567890123456)
(1 row)
SELECT '-1234567890123456'::cube AS cube;
cube
---------------------
(-1234567890123456)
(1 row)
SELECT '.1234567890123456'::cube AS cube;
cube
----------------------
(0.1234567890123456)
(1 row)
SELECT '+.1234567890123456'::cube AS cube;
cube
----------------------
(0.1234567890123456)
(1 row)
SELECT '-.1234567890123456'::cube AS cube;
cube
-----------------------
(-0.1234567890123456)
(1 row)
-- simple lists (points)
SELECT '1,2'::cube AS cube;
cube
......@@ -924,6 +963,224 @@ SELECT '(-1,-1),(1,1)'::cube @ '(-2),(1)'::cube AS bool;
f
(1 row)
-- Test of distance function
--
SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
cube_distance
---------------
4
(1 row)
SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
cube_distance
---------------
0.5
(1 row)
-- Test of cube function (text to cube)
--
SELECT cube('('||1||','||1.2||')');
cube
----------
(1, 1.2)
(1 row)
SELECT cube(NULL);
cube
------
(1 row)
-- Test of cube_dim function (dimensions stored in cube)
--
SELECT cube_dim('(0)'::cube);
cube_dim
----------
1
(1 row)
SELECT cube_dim('(0,0)'::cube);
cube_dim
----------
2
(1 row)
SELECT cube_dim('(0,0,0)'::cube);
cube_dim
----------
3
(1 row)
-- Test of cube_ll_coord function (retrieves LL coodinate values)
--
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
cube_ll_coord
---------------
-1
(1 row)
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
cube_ll_coord
---------------
-2
(1 row)
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
cube_ll_coord
---------------
0
(1 row)
-- Test of cube_ur_coord function (retrieves UR coodinate values)
--
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
cube_ur_coord
---------------
2
(1 row)
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
cube_ur_coord
---------------
1
(1 row)
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
cube_ur_coord
---------------
0
(1 row)
-- Test of cube_is_point
--
SELECT cube_is_point('(0)'::cube);
cube_is_point
---------------
t
(1 row)
SELECT cube_is_point('(0,1,2)'::cube);
cube_is_point
---------------
t
(1 row)
SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
cube_is_point
---------------
t
(1 row)
SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
cube_is_point
---------------
f
(1 row)
SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
cube_is_point
---------------
f
(1 row)
SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
cube_is_point
---------------
f
(1 row)
-- Test of cube_enlarge (enlarging and shrinking cubes)
--
SELECT cube_enlarge('(0)'::cube, 0, 0);
cube_enlarge
--------------
(0)
(1 row)
SELECT cube_enlarge('(0)'::cube, 0, 1);
cube_enlarge
--------------
(0)
(1 row)
SELECT cube_enlarge('(0)'::cube, 0, 2);
cube_enlarge
--------------
(0)
(1 row)
SELECT cube_enlarge('(0)'::cube, 1, 0);
cube_enlarge
--------------
(-1),(1)
(1 row)
SELECT cube_enlarge('(0)'::cube, 1, 1);
cube_enlarge
--------------
(-1),(1)
(1 row)
SELECT cube_enlarge('(0)'::cube, 1, 2);
cube_enlarge
-----------------
(-1, -1),(1, 1)
(1 row)
SELECT cube_enlarge('(0)'::cube, -1, 0);
cube_enlarge
--------------
(0)
(1 row)
SELECT cube_enlarge('(0)'::cube, -1, 1);
cube_enlarge
--------------
(0)
(1 row)
SELECT cube_enlarge('(0)'::cube, -1, 2);
cube_enlarge
--------------
(0)
(1 row)
SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
cube_enlarge
------------------------
(-1, -1, -1),(1, 1, 1)
(1 row)
SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
cube_enlarge
------------------------
(-1, -1, -1),(1, 1, 1)
(1 row)
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
cube_enlarge
-----------------
(-4, -3),(3, 8)
(1 row)
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
cube_enlarge
------------------
(-6, -5),(5, 10)
(1 row)
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
cube_enlarge
-----------------
(-2, -1),(1, 6)
(1 row)
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
cube_enlarge
---------------------
(-0.5, 1),(-0.5, 4)
(1 row)
-- Load some example data and build the index
--
CREATE TABLE test_cube (c cube);
......
......@@ -23,20 +23,26 @@ SELECT '.1'::cube AS cube;
SELECT '-.1'::cube AS cube;
SELECT '1.0'::cube AS cube;
SELECT '-1.0'::cube AS cube;
SELECT '1e7'::cube AS cube;
SELECT '-1e7'::cube AS cube;
SELECT '1.0e7'::cube AS cube;
SELECT '-1.0e7'::cube AS cube;
SELECT '1e+7'::cube AS cube;
SELECT '-1e+7'::cube AS cube;
SELECT '1.0e+7'::cube AS cube;
SELECT '-1.0e+7'::cube AS cube;
SELECT '1e27'::cube AS cube;
SELECT '-1e27'::cube AS cube;
SELECT '1.0e27'::cube AS cube;
SELECT '-1.0e27'::cube AS cube;
SELECT '1e+27'::cube AS cube;
SELECT '-1e+27'::cube AS cube;
SELECT '1.0e+27'::cube AS cube;
SELECT '-1.0e+27'::cube AS cube;
SELECT '1e-7'::cube AS cube;
SELECT '-1e-7'::cube AS cube;
SELECT '1.0e-7'::cube AS cube;
SELECT '-1.0e-7'::cube AS cube;
SELECT '1e-700'::cube AS cube;
SELECT '-1e-700'::cube AS cube;
SELECT '1234567890123456'::cube AS cube;
SELECT '+1234567890123456'::cube AS cube;
SELECT '-1234567890123456'::cube AS cube;
SELECT '.1234567890123456'::cube AS cube;
SELECT '+.1234567890123456'::cube AS cube;
SELECT '-.1234567890123456'::cube AS cube;
-- simple lists (points)
SELECT '1,2'::cube AS cube;
......@@ -230,6 +236,60 @@ SELECT '(-1,-1),(1,1)'::cube @ '(-1),(1)'::cube AS bool;
SELECT '(-1),(1)'::cube @ '(-2),(1)'::cube AS bool;
SELECT '(-1,-1),(1,1)'::cube @ '(-2),(1)'::cube AS bool;
-- Test of distance function
--
SELECT cube_distance('(0)'::cube,'(2,2,2,2)'::cube);
SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
-- Test of cube function (text to cube)
--
SELECT cube('('||1||','||1.2||')');
SELECT cube(NULL);
-- Test of cube_dim function (dimensions stored in cube)
--
SELECT cube_dim('(0)'::cube);
SELECT cube_dim('(0,0)'::cube);
SELECT cube_dim('(0,0,0)'::cube);
-- Test of cube_ll_coord function (retrieves LL coodinate values)
--
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 2);
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
-- Test of cube_ur_coord function (retrieves UR coodinate values)
--
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 2);
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
-- Test of cube_is_point
--
SELECT cube_is_point('(0)'::cube);
SELECT cube_is_point('(0,1,2)'::cube);
SELECT cube_is_point('(0,1,2),(0,1,2)'::cube);
SELECT cube_is_point('(0,1,2),(-1,1,2)'::cube);
SELECT cube_is_point('(0,1,2),(0,-1,2)'::cube);
SELECT cube_is_point('(0,1,2),(0,1,-2)'::cube);
-- Test of cube_enlarge (enlarging and shrinking cubes)
--
SELECT cube_enlarge('(0)'::cube, 0, 0);
SELECT cube_enlarge('(0)'::cube, 0, 1);
SELECT cube_enlarge('(0)'::cube, 0, 2);
SELECT cube_enlarge('(0)'::cube, 1, 0);
SELECT cube_enlarge('(0)'::cube, 1, 1);
SELECT cube_enlarge('(0)'::cube, 1, 2);
SELECT cube_enlarge('(0)'::cube, -1, 0);
SELECT cube_enlarge('(0)'::cube, -1, 1);
SELECT cube_enlarge('(0)'::cube, -1, 2);
SELECT cube_enlarge('(0,0,0)'::cube, 1, 0);
SELECT cube_enlarge('(0,0,0)'::cube, 1, 2);
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 1, 2);
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, 3, 2);
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
-- Load some example data and build the index
--
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment