summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael P2011-03-22 14:46:22 +0000
committerPavan Deolasee2011-05-24 10:11:49 +0000
commit71ba7f047af5d7dbdbb5287146802b07b5970d82 (patch)
treed2c5cae25bed1b4bceed1d8ff28844c6be27080c
parent3ea4ee8f50c165af648cf7d7c8ff71a5b81d2d50 (diff)
Fix for regression test box
box is not a type that can use ORDER BY, so its table is replicated for regression tests
-rw-r--r--src/test/regress/expected/box_1.out8
-rw-r--r--src/test/regress/sql/box.sql5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/test/regress/expected/box_1.out b/src/test/regress/expected/box_1.out
index 7bd428ae4b..7ff601766e 100644
--- a/src/test/regress/expected/box_1.out
+++ b/src/test/regress/expected/box_1.out
@@ -15,7 +15,9 @@
-- 0 1 2 3
--
-- boxes are specified by two points, given by four floats x1,y1,x2,y2
-CREATE TABLE BOX_TBL (f1 box);
+-- Postgres-XC case: box type cannot use ORDER BY so its table
+-- is replicated for regression tests
+CREATE TABLE BOX_TBL (f1 box) DISTRIBUTE BY REPLICATION;
INSERT INTO BOX_TBL (f1) VALUES ('(2.0,2.0,0.0,0.0)');
INSERT INTO BOX_TBL (f1) VALUES ('(1.0,1.0,3.0,3.0)');
-- degenerate cases where the box is a line or a point
@@ -34,10 +36,10 @@ LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad');
SELECT '' AS four, * FROM BOX_TBL;
four | f1
------+---------------------
- | (3,3),(1,1)
- | (3,3),(3,3)
| (2,2),(0,0)
+ | (3,3),(1,1)
| (2.5,3.5),(2.5,2.5)
+ | (3,3),(3,3)
(4 rows)
SELECT '' AS four, b.*, area(b.f1) as barea
diff --git a/src/test/regress/sql/box.sql b/src/test/regress/sql/box.sql
index baf86ae705..8c173830c1 100644
--- a/src/test/regress/sql/box.sql
+++ b/src/test/regress/sql/box.sql
@@ -18,8 +18,9 @@
-- boxes are specified by two points, given by four floats x1,y1,x2,y2
-
-CREATE TABLE BOX_TBL (f1 box);
+-- Postgres-XC case: box type cannot use ORDER BY so its table
+-- is replicated for regression tests
+CREATE TABLE BOX_TBL (f1 box) DISTRIBUTE BY REPLICATION;
INSERT INTO BOX_TBL (f1) VALUES ('(2.0,2.0,0.0,0.0)');