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

Commit83b8cf5

Browse files
author
Thomas G. Lockhart
committed
Add inter-type regression tests for geometry, date/time, and numbers.
Add regression tests for circles, line segments, and paths.Modify regression tests to allow GEQ optimizer (order results).
1 parent57f5503 commit83b8cf5

34 files changed

+1626
-165
lines changed

‎src/test/regress/expected/abstime.out

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,21 @@ three|f1
139139
|Mon May 10 23:59:12 1943 PST
140140
(3 rows)
141141

142-
QUERY: SELECT '' AS ten, ABSTIME_TBL.*, RELTIME_TBL.*
142+
QUERY: SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
143143
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
144-
< 'Jan 14 14:00:00 1971'::abstime;
145-
ten|f1 |f1
144+
< 'Jan 14 14:00:00 1971'::abstime
145+
ORDER BY abstime, reltime;
146+
ten|abstime |reltime
146147
---+----------------------------+----------------
147-
|epoch|@1 minute
148+
|Mon May 10 23:59:12 1943 PST|@14 seconds ago
148149
|Mon May 10 23:59:12 1943 PST|@ 1 minute
149-
|epoch |@ 5 hours
150150
|Mon May 10 23:59:12 1943 PST|@ 5 hours
151-
|epoch |@ 10 days
152151
|Mon May 10 23:59:12 1943 PST|@ 10 days
153-
|epoch |@ 3 months
154152
|Mon May 10 23:59:12 1943 PST|@ 3 months
155153
|epoch |@ 14 seconds ago
156-
|Mon May 10 23:59:12 1943 PST|@ 14 seconds ago
154+
|epoch |@ 1 minute
155+
|epoch |@ 5 hours
156+
|epoch |@ 10 days
157+
|epoch |@ 3 months
157158
(10 rows)
158159

‎src/test/regress/expected/box.out

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,12 @@ one|f1 |f1
167167
|(3,3),(1,1)|(3,3),(3,3)
168168
(1 row)
169169

170-
QUERY: DROP TABLE BOX_TBL;
170+
QUERY: SELECT '' AS four, height(f1), width(f1) FROM BOX_TBL;
171+
four|height|width
172+
----+------+-----
173+
| 2| 2
174+
| 2| 2
175+
| 1| 0
176+
| 0| 0
177+
(4 rows)
178+

‎src/test/regress/expected/circle.out

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
QUERY: CREATE TABLE CIRCLE_TBL (f1 circle);
2+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('<(0,0),3>');
3+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('<(1,2),100>');
4+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('1,3,5');
5+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('((1,2),3)');
6+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10>');
7+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('<(100,0),100>');
8+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>');
9+
WARN:Bad circle external representation '<(-100,0),-100>'
10+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5');
11+
WARN:Bad circle external representation '1abc,3,5'
12+
QUERY: INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)');
13+
WARN:Bad circle external representation '(3,(1,2),3)'
14+
QUERY: SELECT * FROM CIRCLE_TBL;
15+
f1
16+
--------------
17+
<(0,0),3>
18+
<(1,2),100>
19+
<(1,3),5>
20+
<(1,2),3>
21+
<(100,200),10>
22+
<(100,0),100>
23+
(6 rows)
24+
25+
QUERY: SELECT '' AS six, center(f1) AS center
26+
FROM CIRCLE_TBL;
27+
six|center
28+
---+---------
29+
|(0,0)
30+
|(1,2)
31+
|(1,3)
32+
|(1,2)
33+
|(100,200)
34+
|(100,0)
35+
(6 rows)
36+
37+
QUERY: SELECT '' AS six, radius(f1) AS radius
38+
FROM CIRCLE_TBL;
39+
six|radius
40+
---+------
41+
| 3
42+
| 100
43+
| 5
44+
| 3
45+
| 10
46+
| 100
47+
(6 rows)
48+
49+
QUERY: SELECT '' AS six, diameter(f1) AS diameter
50+
FROM CIRCLE_TBL;
51+
six|diameter
52+
---+--------
53+
| 6
54+
| 200
55+
| 10
56+
| 6
57+
| 20
58+
| 200
59+
(6 rows)
60+
61+
QUERY: SELECT '' AS two, f1 FROM CIRCLE_TBL WHERE radius(f1) < 5;
62+
two|f1
63+
---+---------
64+
|<(0,0),3>
65+
|<(1,2),3>
66+
(2 rows)
67+
68+
QUERY: SELECT '' AS four, f1 FROM CIRCLE_TBL WHERE diameter(f1) >= 10;
69+
four|f1
70+
----+--------------
71+
|<(1,2),100>
72+
|<(1,3),5>
73+
|<(100,200),10>
74+
|<(100,0),100>
75+
(4 rows)
76+
77+
QUERY: SELECT '' as five, c1.f1 AS one, c2.f1 AS two, (c1.f1 <===> c2.f1) AS distance
78+
FROM CIRCLE_TBL c1, CIRCLE_TBL c2
79+
WHERE (c1.f1 < c2.f1) AND ((c1.f1 <===> c2.f1) > 0)
80+
ORDER BY distance, one, two;
81+
five|one |two | distance
82+
----+--------------+--------------+----------------
83+
|<(100,200),10>|<(100,0),100> | 90
84+
|<(100,200),10>|<(1,2),100> |111.370729772479
85+
|<(1,3),5> |<(100,200),10>|205.476756144497
86+
|<(1,2),3> |<(100,200),10>|208.370729772479
87+
|<(0,0),3> |<(100,200),10>|210.606797749979
88+
(5 rows)
89+

‎src/test/regress/expected/datetime.out

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ QUERY: INSERT INTO DATETIME_TBL VALUES ('Jan 01 17:32:01 2001');
112112
QUERY: INSERT INTO DATETIME_TBL VALUES ('Feb 16 17:32:01 -0097');
113113
WARN:Bad datetime external representation Feb 16 17:32:01 -0097
114114
QUERY: INSERT INTO DATETIME_TBL VALUES ('Feb 16 17:32:01 5097 BC');
115+
WARN:Datetime out of range Feb 16 17:32:01 5097 BC
115116
QUERY: SELECT '' AS sixtythree, d1 FROM DATETIME_TBL;
116117
sixtythree|d1
117118
----------+-------------------------------
@@ -177,8 +178,7 @@ sixtythree|d1
177178
|Sat Jan 01 17:32:01.00 2000 PST
178179
|Sun Dec 31 17:32:01.00 2000 PST
179180
|Mon Jan 01 17:32:01.00 2001 PST
180-
|invalid
181-
(63 rows)
181+
(62 rows)
182182

183183
QUERY: SELECT '' AS fortythree, d1 FROM DATETIME_TBL
184184
WHERE d1 > '1997-01-02'::datetime and d1 != 'current'::datetime;
@@ -458,8 +458,7 @@ sixtythree|one_year
458458
|Mon Jan 01 17:32:01.00 2001 PST
459459
|Mon Dec 31 17:32:01.00 2001 PST
460460
|Tue Jan 01 17:32:01.00 2002 PST
461-
|invalid
462-
(63 rows)
461+
(62 rows)
463462

464463
QUERY: SELECT '' AS sixtythree, d1 - '1 year'::timespan AS one_year FROM DATETIME_TBL;
465464
sixtythree|one_year
@@ -526,8 +525,7 @@ sixtythree|one_year
526525
|Fri Jan 01 17:32:01.00 1999 PST
527526
|Fri Dec 31 17:32:01.00 1999 PST
528527
|Sat Jan 01 17:32:01.00 2000 PST
529-
|invalid
530-
(63 rows)
528+
(62 rows)
531529

532530
QUERY: SELECT '' AS fifty, d1 - '1997-01-02'::datetime AS diff
533531
FROM DATETIME_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';

‎src/test/regress/expected/errors.out

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
QUERY: select 1
22
select
33
select * from nonesuch;
4-
WARN:parser:syntax error at or near "select"
4+
WARN:parser:parse error at or near "select"
55

66
QUERY: select nonesuch from pg_database;
77
WARN:attribute "nonesuch" not found
@@ -10,22 +10,22 @@ WARN:attribute "nonesuch" not found
1010
QUERY: select * from pg_database where pg_database.datname = nonesuch;
1111
WARN:attribute "nonesuch" not found
1212
QUERY: select distinct on foobar from pg_database;
13-
WARN:parser:syntax error at or near "from"
13+
WARN:parser:parse error at or near "from"
1414

1515
QUERY: select distinct on foobar * from pg_database;
1616
WARN:The field specified in the UNIQUE ON clause is not in the targetlist
1717
QUERY: delete from;
18-
WARN:parser:syntax error at or near ";"
18+
WARN:parser:parse error at or near ";"
1919

2020
QUERY: delete from nonesuch;
2121
WARN:nonesuch: Table does not exist.
2222
QUERY: drop table;
23-
WARN:parser:syntax error at or near ";"
23+
WARN:parser:parse error at or near ";"
2424

2525
QUERY: drop table nonesuch;
2626
WARN:Relation nonesuch Does Not Exist!
2727
QUERY: alter table rename;
28-
WARN:parser:syntax error at or near "rename"
28+
WARN:parser:parse error at or near "rename"
2929

3030
QUERY: alter table nonesuch rename to newnonesuch;
3131
WARN:renamerel: relation "nonesuch" does not exist
@@ -84,54 +84,54 @@ QUERY: create aggregate newcnt1 (sfunc2 = int4inc,
8484
stype2 = int4);
8585
WARN:AggregateCreate: transition function 2 MUST have an initial value
8686
QUERY: drop index;
87-
WARN:parser:syntax error at or near ";"
87+
WARN:parser:parse error at or near ";"
8888

8989
QUERY: drop index 314159;
90-
WARN:parser:syntax error at or near "314159"
90+
WARN:parser:parse error at or near "314159"
9191

9292
QUERY: drop index nonesuch;
9393
WARN:index "nonesuch" nonexistent
9494
QUERY: drop aggregate;
95-
WARN:parser:syntax error at or near ";"
95+
WARN:parser:parse error at or near ";"
9696

9797
QUERY: drop aggregate 314159;
98-
WARN:parser:syntax error at or near "314159"
98+
WARN:parser:parse error at or near "314159"
9999

100100
QUERY: drop aggregate nonesuch;
101101
WARN:RemoveAggregate: aggregate 'nonesuch' does not exist
102102
QUERY: drop function ();
103-
WARN:parser:syntax error at or near "("
103+
WARN:parser:parse error at or near "("
104104

105105
QUERY: drop function 314159();
106-
WARN:parser:syntax error at or near "314159"
106+
WARN:parser:parse error at or near "314159"
107107

108108
QUERY: drop function nonesuch();
109109
WARN:RemoveFunction: function nonesuch() does not exist
110110
QUERY: drop type;
111-
WARN:parser:syntax error at or near ";"
111+
WARN:parser:parse error at or near ";"
112112

113113
QUERY: drop type 314159;
114-
WARN:parser:syntax error at or near "314159"
114+
WARN:parser:parse error at or near "314159"
115115

116116
QUERY: drop type nonesuch;
117117
WARN:RemoveType: type 'nonesuch' does not exist
118118
QUERY: drop operator;
119-
WARN:parser:syntax error at or near ";"
119+
WARN:parser:parse error at or near ";"
120120

121121
QUERY: drop operator equals;
122-
WARN:parser:syntax error at or near "equals"
122+
WARN:parser:parse error at or near "equals"
123123

124124
QUERY: drop operator ===;
125-
WARN:parser:syntax error at or near ";"
125+
WARN:parser:parse error at or near ";"
126126

127127
QUERY: drop operator int4, int4;
128-
WARN:parser:syntax error at or near "int4"
128+
WARN:parser:parse error at or near "int4"
129129

130130
QUERY: drop operator (int4, int4);
131-
WARN:parser:syntax error at or near "("
131+
WARN:parser:parse error at or near "("
132132

133133
QUERY: drop operator === ();
134-
WARN:parser:syntax error at or near ")"
134+
WARN:parser:parse error at or near ")"
135135

136136
QUERY: drop operator === (int4);
137137
WARN:parser: argument type missing (use NONE for unary operators)
@@ -140,29 +140,29 @@ WARN:RemoveOperator: binary operator '===' taking 'int4' and 'int4' does not exi
140140
QUERY: drop operator = (nonesuch);
141141
WARN:parser: argument type missing (use NONE for unary operators)
142142
QUERY: drop operator = ( , int4);
143-
WARN:parser:syntax error at or near ","
143+
WARN:parser:parse error at or near ","
144144

145145
QUERY: drop operator = (nonesuch, int4);
146146
WARN:RemoveOperator: type 'nonesuch' does not exist
147147
QUERY: drop operator = (int4, nonesuch);
148148
WARN:RemoveOperator: type 'nonesuch' does not exist
149149
QUERY: drop operator = (int4, );
150-
WARN:parser:syntax error at or near ")"
150+
WARN:parser:parse error at or near ")"
151151

152152
QUERY: drop rule;
153-
WARN:parser:syntax error at or near ";"
153+
WARN:parser:parse error at or near ";"
154154

155155
QUERY: drop rule 314159;
156-
WARN:parser:syntax error at or near "314159"
156+
WARN:parser:parse error at or near "314159"
157157

158158
QUERY: drop rule nonesuch;
159159
WARN:RewriteGetRuleEventRel: rule "nonesuch" not found
160160
QUERY: drop tuple rule nonesuch;
161-
WARN:parser:syntax error at or near "tuple"
161+
WARN:parser:parse error at or near "tuple"
162162

163163
QUERY: drop instance rule nonesuch;
164-
WARN:parser:syntax error at or near "instance"
164+
WARN:parser:parse error at or near "instance"
165165

166166
QUERY: drop rewrite rule nonesuch;
167-
WARN:parser:syntax error at or near "rewrite"
167+
WARN:parser:parse error at or near "rewrite"
168168

‎src/test/regress/expected/float4.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,3 @@ five|f1
146146
|-1.23457e-20
147147
(5 rows)
148148

149-
QUERY: DROP TABLE FLOAT4_TBL;

‎src/test/regress/expected/float8.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,3 @@ five|f1
223223
|-1.2345678901234e-200
224224
(5 rows)
225225

226-
QUERY: DROP TABLE FLOAT8_TBL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp