aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-10-25 07:08:40 -0400
committerPeter Eisentraut <peter_e@gmx.net>2013-10-25 07:08:40 -0400
commita0a546f0d94ec6cbb3cd6b1c82f58d801046615f (patch)
tree1f9ddb072e38430adfa5a8952df9f24139906363 /src
parent5e1e47c7c00d01d1b2fd3a4354f48be427a30f67 (diff)
downloadpostgresql-a0a546f0d94ec6cbb3cd6b1c82f58d801046615f.tar.gz
postgresql-a0a546f0d94ec6cbb3cd6b1c82f58d801046615f.zip
Tweak "line" test to avoid negative zeros on some platforms
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/line.out18
-rw-r--r--src/test/regress/sql/line.sql2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/regress/expected/line.out b/src/test/regress/expected/line.out
index f20abdc4301..877b9e933d9 100644
--- a/src/test/regress/expected/line.out
+++ b/src/test/regress/expected/line.out
@@ -5,7 +5,7 @@
--DROP TABLE LINE_TBL;
CREATE TABLE LINE_TBL (s line);
INSERT INTO LINE_TBL VALUES ('{1,-1,1}');
-INSERT INTO LINE_TBL VALUES ('(0,0),(6,6)');
+INSERT INTO LINE_TBL VALUES ('(0,0.1),(6,6)');
INSERT INTO LINE_TBL VALUES ('10,-10 ,-5,-4');
INSERT INTO LINE_TBL VALUES ('[-1e6,2e2,3e5, -4e1]');
INSERT INTO LINE_TBL VALUES ('(11,22,33,44)');
@@ -42,7 +42,7 @@ select * from LINE_TBL;
s
---------------------------------------------
{1,-1,1}
- {1,-1,0}
+ {0.983333333333333,-1,0.1}
{-0.4,-1,-6}
{-0.000184615384615385,-1,15.3846153846154}
{1,-1,11}
@@ -55,7 +55,7 @@ SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10;
s
---------------------------------------------
{1,-1,1}
- {1,-1,0}
+ {0.983333333333333,-1,0.1}
{-0.4,-1,-6}
{-0.000184615384615385,-1,15.3846153846154}
{1,-1,11}
@@ -64,17 +64,17 @@ SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10;
(7 rows)
SELECT * FROM LINE_TBL WHERE (point '(0.1,0.1)' <-> s) < 1;
- s
-----------
+ s
+----------------------------
{1,-1,1}
- {1,-1,0}
+ {0.983333333333333,-1,0.1}
(2 rows)
SELECT * FROM LINE_TBL WHERE (lseg '[(0.1,0.1),(0.2,0.2)]' <-> s) < 1;
- s
-----------
+ s
+----------------------------
{1,-1,1}
- {1,-1,0}
+ {0.983333333333333,-1,0.1}
(2 rows)
SELECT line '[(1,1),(2,1)]' <-> line '[(-1,-1),(-2,-1)]';
diff --git a/src/test/regress/sql/line.sql b/src/test/regress/sql/line.sql
index 94067b0cee6..5af561bcfae 100644
--- a/src/test/regress/sql/line.sql
+++ b/src/test/regress/sql/line.sql
@@ -7,7 +7,7 @@
CREATE TABLE LINE_TBL (s line);
INSERT INTO LINE_TBL VALUES ('{1,-1,1}');
-INSERT INTO LINE_TBL VALUES ('(0,0),(6,6)');
+INSERT INTO LINE_TBL VALUES ('(0,0.1),(6,6)');
INSERT INTO LINE_TBL VALUES ('10,-10 ,-5,-4');
INSERT INTO LINE_TBL VALUES ('[-1e6,2e2,3e5, -4e1]');
INSERT INTO LINE_TBL VALUES ('(11,22,33,44)');