cube_1 variant is needed in 7.4 branch, per results from buildfarm
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Jul 2005 20:11:12 +0000 (20:11 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Jul 2005 20:11:12 +0000 (20:11 +0000)
machine 'kudu'.

contrib/cube/expected/cube_1.out

index 73a7c2f115a1f606474d868d7cc53e62db38c976..f5ee88064cabef35f6dc03130df7ac4767dc821b 100644 (file)
@@ -594,6 +594,254 @@ SELECT '[(-1,-1,-1),(1,1,1)]'::cube && '[(2,1,1),(2,2,2)]'::cube AS bool;
  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):
 --