f
(1 row)
+-- "overlap on the left" / "overlap on the right"
+-- (these operators are not useful at all but R-tree seems to be
+-- sensitive to their presence)
+--
+SELECT '1'::cube &< '0'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '1'::cube &< '1'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '1'::cube &< '2'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube &< '0'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube &< '1'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube &< '(0),(0.5)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube &< '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube &< '(0),(2)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube &< '(1),(2)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube &< '(2),(3)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '0'::cube &> '1'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '1'::cube &> '1'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '2'::cube &> '1'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '0'::cube &> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '1'::cube &> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(0.5)' &> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube &> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(2)'::cube &> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(1),(2)'::cube &> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(2),(3)'::cube &> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+-- "left" / "right"
+-- (these operators are not useful but for 1-D or 2-D cubes, but R-tree
+-- seems to want them defined)
+--
+SELECT '1'::cube << '0'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '1'::cube << '1'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '1'::cube << '2'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube << '0'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube << '1'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube << '(0),(0.5)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube << '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube << '(0),(2)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube << '(1),(2)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(1)'::cube << '(2),(3)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '0'::cube >> '1'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '1'::cube >> '1'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '2'::cube >> '1'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '0'::cube >> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '1'::cube >> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(0),(0.5)' >> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(1)'::cube >> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(0),(2)'::cube >> '(0),(1)'::cube AS bool;
+ bool
+------
+ f
+(1 row)
+
+SELECT '(1),(2)'::cube >> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
+SELECT '(2),(3)'::cube >> '(0),(1)'::cube AS bool;
+ bool
+------
+ t
+(1 row)
+
-- "contained in" (the left operand is the cube entirely enclosed by
-- the right operand):
--