Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2d0e6b0

Browse files
author
Thomas G. Lockhart
committed
Test new intersection and closest point operators.
Fix up results labels on queries.
1 parentf2a9e20 commit2d0e6b0

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

‎src/test/regress/sql/geometry.sql

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
-- Points
33
--
44

5-
SELECT''ASxxx, center(f1)AS center
5+
SELECT''ASfour, center(f1)AS center
66
FROM BOX_TBL;
77

8-
SELECT''ASxxx, (@@ f1)AS center
8+
SELECT''ASfour, (@@ f1)AS center
99
FROM BOX_TBL;
1010

11-
SELECT''ASxxx,point(f1)AS center
11+
SELECT''ASsix,point(f1)AS center
1212
FROM CIRCLE_TBL;
1313

14-
SELECT''ASxxx, (@@ f1)AS center
14+
SELECT''ASsix, (@@ f1)AS center
1515
FROM CIRCLE_TBL;
1616

17-
SELECT''ASxxx, (@@ f1)AS center
17+
SELECT''AStwo, (@@ f1)AS center
1818
FROM POLYGON_TBL
1919
WHERE (# f1) > 2;
2020

@@ -43,11 +43,11 @@ SELECT '' AS one, p1.f1
4343
--
4444

4545
-- intersection
46-
SELECT''ASxxx,p.f1,l.s,l.s# p.f1 AS intersection
46+
SELECT''AScount,p.f1,l.s,l.s# p.f1 AS intersection
4747
FROM LSEG_TBL l, POINT_TBL p;
4848

4949
-- closest point
50-
SELECT''ASxxx,p.f1,l.s,p.f1## l.s AS closest
50+
SELECT''ASthirty,p.f1,l.s,p.f1## l.s AS closest
5151
FROM LSEG_TBL l, POINT_TBL p;
5252

5353
--
@@ -58,20 +58,20 @@ SELECT '' AS xxx, p.f1, l.s, p.f1 ## l.s AS closest
5858
-- Boxes
5959
--
6060

61-
SELECTbox(f1)ASboxFROM CIRCLE_TBL;
61+
SELECT''as six,box(f1)ASboxFROM CIRCLE_TBL;
6262

6363
-- translation
64-
SELECT''AScount,b.f1+p.f1AS translation
64+
SELECT''AStwentyfour,b.f1+p.f1AS translation
6565
FROM BOX_TBL b, POINT_TBL p;
6666

67-
SELECT''AScount,b.f1-p.f1AS translation
67+
SELECT''AStwentyfour,b.f1-p.f1AS translation
6868
FROM BOX_TBL b, POINT_TBL p;
6969

7070
-- scaling and rotation
71-
SELECT''AScount,b.f1*p.f1AS rotation
71+
SELECT''AStwentyfour,b.f1*p.f1AS rotation
7272
FROM BOX_TBL b, POINT_TBL p;
7373

74-
SELECT''AScount,b.f1/p.f1AS rotation
74+
SELECT''AStwenty,b.f1/p.f1AS rotation
7575
FROM BOX_TBL b, POINT_TBL p
7676
WHERE (p.f1<->'(0,0)'::point)>=1;
7777

@@ -81,9 +81,9 @@ SELECT '' AS count, b.f1 / p.f1 AS rotation
8181

8282
SET geqo TO'off';
8383

84-
SELECT''ASxxx, points(f1)AS npoints, f1ASpathFROM PATH_TBL;
84+
SELECT''ASeight, points(f1)AS npoints, f1ASpathFROM PATH_TBL;
8585

86-
SELECT''ASxxx,path(f1)FROM POLYGON_TBL;
86+
SELECT''ASfour,path(f1)FROM POLYGON_TBL;
8787

8888
-- translation
8989
SELECT''AS eight,p1.f1+'(10,10)'::pointAS dist_add
@@ -100,46 +100,46 @@ RESET geqo;
100100
--
101101

102102
-- containment
103-
SELECT''ASxxx,p.f1,poly.f1,poly.f1 ~p.f1AS contains
103+
SELECT''AStwentyfour,p.f1,poly.f1,poly.f1 ~p.f1AS contains
104104
FROM POLYGON_TBL poly, POINT_TBL p;
105105

106-
SELECT''ASxxx,p.f1,poly.f1,p.f1 @poly.f1AS contained
106+
SELECT''AStwentyfour,p.f1,poly.f1,p.f1 @poly.f1AS contained
107107
FROM POLYGON_TBL poly, POINT_TBL p;
108108

109-
SELECT''ASxxx, points(f1)AS npoints, f1ASpolygon
109+
SELECT''ASfour, points(f1)AS npoints, f1ASpolygon
110110
FROM POLYGON_TBL;
111111

112-
SELECT''ASxxx,polygon(f1)
112+
SELECT''ASfour,polygon(f1)
113113
FROM BOX_TBL;
114114

115-
SELECT''ASxxx,polygon(f1)
115+
SELECT''ASfour,polygon(f1)
116116
FROM PATH_TBLWHERE isclosed(f1);
117117

118-
SELECT''ASxxx, f1AS open_path,polygon( pclose(f1))ASpolygon
118+
SELECT''ASfour, f1AS open_path,polygon( pclose(f1))ASpolygon
119119
FROM PATH_TBL
120120
WHERE isopen(f1);
121121

122122
-- convert circles to polygons using the default number of points
123-
SELECT''ASxxx,polygon(f1)
123+
SELECT''ASsix,polygon(f1)
124124
FROM CIRCLE_TBL;
125125

126126
-- convert the circle to an 8-point polygon
127-
SELECT''ASxxx,polygon(8, f1)
127+
SELECT''ASsix,polygon(8, f1)
128128
FROM CIRCLE_TBL;
129129

130130
--
131131
-- Circles
132132
--
133133

134-
SELECT''ASxxx,circle(f1,50.0)
134+
SELECT''ASsix,circle(f1,50.0)
135135
FROM POINT_TBL;
136136

137-
SELECT''ASxxx,circle(f1)
137+
SELECT''ASfour,circle(f1)
138138
FROM BOX_TBL;
139139

140-
SELECT''ASxxx,circle(f1)
140+
SELECT''AStwo,circle(f1)
141141
FROM POLYGON_TBL
142-
WHERE (# f1) >=2;
142+
WHERE (# f1) >=3;
143143

144144
SELECT''AS twentyfour,c1.f1AScircle,p1.f1ASpoint, (p1.f1<->c1.f1)AS distance
145145
FROM CIRCLE_TBL c1, POINT_TBL p1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp