Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a0a546f

Browse files
committed
Tweak "line" test to avoid negative zeros on some platforms
1 parent 5e1e47c commit a0a546f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/test/regress/expected/line.out

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--DROP TABLE LINE_TBL;
66
CREATE TABLE LINE_TBL (s line);
77
INSERT INTO LINE_TBL VALUES ('{1,-1,1}');
8-
INSERT INTO LINE_TBL VALUES ('(0,0),(6,6)');
8+
INSERT INTO LINE_TBL VALUES ('(0,0.1),(6,6)');
99
INSERT INTO LINE_TBL VALUES ('10,-10 ,-5,-4');
1010
INSERT INTO LINE_TBL VALUES ('[-1e6,2e2,3e5, -4e1]');
1111
INSERT INTO LINE_TBL VALUES ('(11,22,33,44)');
@@ -42,7 +42,7 @@ select * from LINE_TBL;
4242
s
4343
---------------------------------------------
4444
{1,-1,1}
45-
{1,-1,0}
45+
{0.983333333333333,-1,0.1}
4646
{-0.4,-1,-6}
4747
{-0.000184615384615385,-1,15.3846153846154}
4848
{1,-1,11}
@@ -55,7 +55,7 @@ SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10;
5555
s
5656
---------------------------------------------
5757
{1,-1,1}
58-
{1,-1,0}
58+
{0.983333333333333,-1,0.1}
5959
{-0.4,-1,-6}
6060
{-0.000184615384615385,-1,15.3846153846154}
6161
{1,-1,11}
@@ -64,17 +64,17 @@ SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10;
6464
(7 rows)
6565

6666
SELECT * FROM LINE_TBL WHERE (point '(0.1,0.1)' <-> s) < 1;
67-
s
68-
----------
67+
s
68+
----------------------------
6969
{1,-1,1}
70-
{1,-1,0}
70+
{0.983333333333333,-1,0.1}
7171
(2 rows)
7272

7373
SELECT * FROM LINE_TBL WHERE (lseg '[(0.1,0.1),(0.2,0.2)]' <-> s) < 1;
74-
s
75-
----------
74+
s
75+
----------------------------
7676
{1,-1,1}
77-
{1,-1,0}
77+
{0.983333333333333,-1,0.1}
7878
(2 rows)
7979

8080
SELECT line '[(1,1),(2,1)]' <-> line '[(-1,-1),(-2,-1)]';

src/test/regress/sql/line.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
CREATE TABLE LINE_TBL (s line);
88

99
INSERT INTO LINE_TBL VALUES ('{1,-1,1}');
10-
INSERT INTO LINE_TBL VALUES ('(0,0),(6,6)');
10+
INSERT INTO LINE_TBL VALUES ('(0,0.1),(6,6)');
1111
INSERT INTO LINE_TBL VALUES ('10,-10 ,-5,-4');
1212
INSERT INTO LINE_TBL VALUES ('[-1e6,2e2,3e5, -4e1]');
1313
INSERT INTO LINE_TBL VALUES ('(11,22,33,44)');

0 commit comments

Comments
 (0)