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

Commit6d9299e

Browse files
author
Thomas G. Lockhart
committed
Move a few specific tests to isolate homogenous type tests into
regression tests for specific types, and move a few others to the cross-type "horology" test.Rearrange the test order slightly, and move the abstime test to the "parallel safe" area.Hand-patch the results for "1947" and for "solaris", so those may not be exactly correct.
1 parent7e2c430 commit6d9299e

File tree

10 files changed

+257
-258
lines changed

10 files changed

+257
-258
lines changed

‎src/test/regress/expected/abstime-1947-PDT.out

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -112,64 +112,18 @@ SELECT '' AS four, ABSTIME_TBL.*
112112
| epoch
113113
(3 rows)
114114

115-
-- these four queries should return the same answer
116-
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
117-
-- therefore, should not show up in the results.
118-
SELECT '' AS three, ABSTIME_TBL.*
119-
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
120-
< abstime 'Jan 14 14:00:00 1977';
121-
three | f1
122-
-------+------------------------------
123-
| Sun Jan 14 03:14:21 1973 PST
124-
| epoch
125-
| Sun May 11 00:59:12 1947 PDT
126-
(3 rows)
127-
128-
SELECT '' AS three, ABSTIME_TBL.*
129-
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago')-- -3 years
130-
< abstime 'Jan 14 14:00:00 1971';
131-
three | f1
132-
-------+------------------------------
133-
| Sun Jan 14 03:14:21 1973 PST
134-
| epoch
135-
| Sun May 11 00:59:12 1947 PDT
136-
(3 rows)
137-
138-
SELECT '' AS three, ABSTIME_TBL.*
139-
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
140-
< abstime 'Jan 14 14:00:00 1971';
141-
three | f1
142-
-------+------------------------------
143-
| Sun Jan 14 03:14:21 1973 PST
144-
| epoch
145-
| Sun May 11 00:59:12 1947 PDT
146-
(3 rows)
147-
148-
SELECT '' AS three, ABSTIME_TBL.*
149-
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
150-
< abstime 'Jan 14 14:00:00 1977';
151-
three | f1
152-
-------+------------------------------
153-
| Sun Jan 14 03:14:21 1973 PST
154-
| epoch
155-
| Sun May 11 00:59:12 1947 PDT
156-
(3 rows)
157-
158-
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
159-
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
160-
< abstime 'Jan 14 14:00:00 1971'
161-
ORDER BY abstime, reltime;
162-
ten | abstime | reltime
163-
-----+------------------------------+---------------
164-
| Sun May 11 00:59:12 1947 PDT | @ 14 secs ago
165-
| Sun May 11 00:59:12 1947 PDT | @ 1 min
166-
| Sun May 11 00:59:12 1947 PDT | @ 5 hours
167-
| Sun May 11 00:59:12 1947 PDT | @ 10 days
168-
| Sun May 11 00:59:12 1947 PDT | @ 3 mons
169-
| epoch | @ 14 secs ago
170-
| epoch | @ 1 min
171-
| epoch | @ 5 hours
172-
| epoch | @ 10 days
173-
| epoch | @ 3 mons
174-
(10 rows)
115+
SELECT '' AS four, f1 AS abstime,
116+
date_part('year', f1) AS year, date_part('month', f1) AS month,
117+
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
118+
date_part('minute', f1) AS minute, date_part('second', f1) AS second
119+
FROM ABSTIME_TBL
120+
WHERE isfinite(f1) and f1 <> abstime 'current'
121+
ORDER BY abstime;
122+
four | abstime | year | month | day | hour | minute | second
123+
------+------------------------------+------+-------+-----+------+--------+--------
124+
| Sun May 11 00:59:12 1947 PDT | 1947 | 5 | 11 | 0 | 59 | 12
125+
| epoch | 1969 | 12 | 31 | 16 | 0 | 0
126+
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
127+
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
128+
(4 rows)
175129

‎src/test/regress/expected/abstime-solaris-1947.out

Lines changed: 14 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -112,64 +112,17 @@ SELECT '' AS four, ABSTIME_TBL.*
112112
| epoch
113113
(3 rows)
114114

115-
-- these four queries should return the same answer
116-
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
117-
-- therefore, should not show up in the results.
118-
SELECT '' AS three, ABSTIME_TBL.*
119-
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
120-
< abstime 'Jan 14 14:00:00 1977';
121-
three | f1
122-
-------+------------------------------
123-
| Sun Jan 14 03:14:21 1973 PST
124-
| epoch
125-
| Sat May 10 23:59:12 1947 PDT
126-
(3 rows)
127-
128-
SELECT '' AS three, ABSTIME_TBL.*
129-
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago')-- -3 years
130-
< abstime 'Jan 14 14:00:00 1971';
131-
three | f1
132-
-------+------------------------------
133-
| Sun Jan 14 03:14:21 1973 PST
134-
| epoch
135-
| Sat May 10 23:59:12 1947 PDT
136-
(3 rows)
137-
138-
SELECT '' AS three, ABSTIME_TBL.*
139-
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
140-
< abstime 'Jan 14 14:00:00 1971';
141-
three | f1
142-
-------+------------------------------
143-
| Sun Jan 14 03:14:21 1973 PST
144-
| epoch
145-
| Sat May 10 23:59:12 1947 PDT
146-
(3 rows)
147-
148-
SELECT '' AS three, ABSTIME_TBL.*
149-
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
150-
< abstime 'Jan 14 14:00:00 1977';
151-
three | f1
152-
-------+------------------------------
153-
| Sun Jan 14 03:14:21 1973 PST
154-
| epoch
155-
| Sat May 10 23:59:12 1947 PDT
156-
(3 rows)
157-
158-
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
159-
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
160-
< abstime 'Jan 14 14:00:00 1971'
161-
ORDER BY abstime, reltime;
162-
ten | abstime | reltime
163-
-----+------------------------------+---------------
164-
| Sat May 10 23:59:12 1947 PDT | @ 14 secs ago
165-
| Sat May 10 23:59:12 1947 PDT | @ 1 min
166-
| Sat May 10 23:59:12 1947 PDT | @ 5 hours
167-
| Sat May 10 23:59:12 1947 PDT | @ 10 days
168-
| Sat May 10 23:59:12 1947 PDT | @ 3 mons
169-
| epoch | @ 14 secs ago
170-
| epoch | @ 1 min
171-
| epoch | @ 5 hours
172-
| epoch | @ 10 days
173-
| epoch | @ 3 mons
174-
(10 rows)
175-
115+
SELECT '' AS four, f1 AS abstime,
116+
date_part('year', f1) AS year, date_part('month', f1) AS month,
117+
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
118+
date_part('minute', f1) AS minute, date_part('second', f1) AS second
119+
FROM ABSTIME_TBL
120+
WHERE isfinite(f1) and f1 <> abstime 'current'
121+
ORDER BY abstime;
122+
four | abstime | year | month | day | hour | minute | second
123+
------+------------------------------+------+-------+-----+------+--------+--------
124+
| Sat May 10 23:59:12 1947 PDT | 1947 | 5 | 10 | 23 | 59 | 12
125+
| epoch | 1969 | 12 | 31 | 16 | 0 | 0
126+
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
127+
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
128+
(4 rows)

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

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -112,64 +112,18 @@ SELECT '' AS four, ABSTIME_TBL.*
112112
| epoch
113113
(3 rows)
114114

115-
-- these four queries should return the same answer
116-
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
117-
-- therefore, should not show up in the results.
118-
SELECT '' AS three, ABSTIME_TBL.*
119-
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
120-
< abstime 'Jan 14 14:00:00 1977';
121-
three | f1
122-
-------+------------------------------
123-
| Sun Jan 14 03:14:21 1973 PST
124-
| epoch
125-
| Sat May 10 23:59:12 1947 PST
126-
(3 rows)
127-
128-
SELECT '' AS three, ABSTIME_TBL.*
129-
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago')-- -3 years
130-
< abstime 'Jan 14 14:00:00 1971';
131-
three | f1
132-
-------+------------------------------
133-
| Sun Jan 14 03:14:21 1973 PST
134-
| epoch
135-
| Sat May 10 23:59:12 1947 PST
136-
(3 rows)
137-
138-
SELECT '' AS three, ABSTIME_TBL.*
139-
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
140-
< abstime 'Jan 14 14:00:00 1971';
141-
three | f1
142-
-------+------------------------------
143-
| Sun Jan 14 03:14:21 1973 PST
144-
| epoch
145-
| Sat May 10 23:59:12 1947 PST
146-
(3 rows)
147-
148-
SELECT '' AS three, ABSTIME_TBL.*
149-
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
150-
< abstime 'Jan 14 14:00:00 1977';
151-
three | f1
152-
-------+------------------------------
153-
| Sun Jan 14 03:14:21 1973 PST
154-
| epoch
155-
| Sat May 10 23:59:12 1947 PST
156-
(3 rows)
157-
158-
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
159-
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
160-
< abstime 'Jan 14 14:00:00 1971'
161-
ORDER BY abstime, reltime;
162-
ten | abstime | reltime
163-
-----+------------------------------+---------------
164-
| Sat May 10 23:59:12 1947 PST | @ 14 secs ago
165-
| Sat May 10 23:59:12 1947 PST | @ 1 min
166-
| Sat May 10 23:59:12 1947 PST | @ 5 hours
167-
| Sat May 10 23:59:12 1947 PST | @ 10 days
168-
| Sat May 10 23:59:12 1947 PST | @ 3 mons
169-
| epoch | @ 14 secs ago
170-
| epoch | @ 1 min
171-
| epoch | @ 5 hours
172-
| epoch | @ 10 days
173-
| epoch | @ 3 mons
174-
(10 rows)
115+
SELECT '' AS four, f1 AS abstime,
116+
date_part('year', f1) AS year, date_part('month', f1) AS month,
117+
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
118+
date_part('minute', f1) AS minute, date_part('second', f1) AS second
119+
FROM ABSTIME_TBL
120+
WHERE isfinite(f1) and f1 <> abstime 'current'
121+
ORDER BY abstime;
122+
four | abstime | year | month | day | hour | minute | second
123+
------+------------------------------+------+-------+-----+------+--------+--------
124+
| Sat May 10 23:59:12 1947 PST | 1947 | 5 | 10 | 23 | 59 | 12
125+
| epoch | 1969 | 12 | 31 | 16 | 0 | 0
126+
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
127+
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
128+
(4 rows)
175129

‎src/test/regress/expected/horology-1947-PDT.out

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -694,20 +694,66 @@ SELECT '' as "54", d1 as timestamp,
694694
--
695695
-- abstime, reltime arithmetic
696696
--
697-
SELECT '' AS four, f1 AS abstime,
698-
date_part('year', f1) AS year, date_part('month', f1) AS month,
699-
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
700-
date_part('minute', f1) AS minute, date_part('second', f1) AS second
701-
FROM ABSTIME_TBL
702-
WHERE isfinite(f1) and f1 <> abstime 'current'
703-
ORDER BY abstime;
704-
four | abstime | year | month | day | hour | minute | second
705-
------+------------------------------+------+-------+-----+------+--------+--------
706-
| Sun May 11 00:59:12 1947 PDT | 1947 | 5 | 11 | 0 | 59 | 12
707-
| epoch | 1969 | 12 | 31 | 16 | 0 | 0
708-
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
709-
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
710-
(4 rows)
697+
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
698+
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
699+
< abstime 'Jan 14 14:00:00 1971'
700+
ORDER BY abstime, reltime;
701+
ten | abstime | reltime
702+
-----+------------------------------+---------------
703+
| Sun May 11 00:59:12 1947 PDT | @ 14 secs ago
704+
| Sun May 11 00:59:12 1947 PDT | @ 1 min
705+
| Sun May 11 00:59:12 1947 PDT | @ 5 hours
706+
| Sun May 11 00:59:12 1947 PDT | @ 10 days
707+
| Sun May 11 00:59:12 1947 PDT | @ 3 mons
708+
| epoch | @ 14 secs ago
709+
| epoch | @ 1 min
710+
| epoch | @ 5 hours
711+
| epoch | @ 10 days
712+
| epoch | @ 3 mons
713+
(10 rows)
714+
715+
-- these four queries should return the same answer
716+
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
717+
-- therefore, should not show up in the results.
718+
SELECT '' AS three, ABSTIME_TBL.*
719+
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
720+
< abstime 'Jan 14 14:00:00 1977';
721+
three | f1
722+
-------+------------------------------
723+
| Sun Jan 14 03:14:21 1973 PST
724+
| epoch
725+
| Sun May 11 00:59:12 1947 PDT
726+
(3 rows)
727+
728+
SELECT '' AS three, ABSTIME_TBL.*
729+
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
730+
< abstime 'Jan 14 14:00:00 1971';
731+
three | f1
732+
-------+------------------------------
733+
| Sun Jan 14 03:14:21 1973 PST
734+
| epoch
735+
| Sun May 11 00:59:12 1947 PDT
736+
(3 rows)
737+
738+
SELECT '' AS three, ABSTIME_TBL.*
739+
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
740+
< abstime 'Jan 14 14:00:00 1971';
741+
three | f1
742+
-------+------------------------------
743+
| Sun Jan 14 03:14:21 1973 PST
744+
| epoch
745+
| Sun May 11 00:59:12 1947 PDT
746+
(3 rows)
747+
748+
SELECT '' AS three, ABSTIME_TBL.*
749+
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
750+
< abstime 'Jan 14 14:00:00 1977';
751+
three | f1
752+
-------+------------------------------
753+
| Sun Jan 14 03:14:21 1973 PST
754+
| epoch
755+
| Sun May 11 00:59:12 1947 PDT
756+
(3 rows)
711757

712758
--
713759
-- Conversions

‎src/test/regress/expected/horology-solaris-1947.out

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -694,20 +694,66 @@ SELECT '' as "54", d1 as timestamp,
694694
--
695695
-- abstime, reltime arithmetic
696696
--
697-
SELECT '' AS four, f1 AS abstime,
698-
date_part('year', f1) AS year, date_part('month', f1) AS month,
699-
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
700-
date_part('minute', f1) AS minute, date_part('second', f1) AS second
701-
FROM ABSTIME_TBL
702-
WHERE isfinite(f1) and f1 <> abstime 'current'
703-
ORDER BY abstime;
704-
four | abstime | year | month | day | hour | minute | second
705-
------+------------------------------+------+-------+-----+------+--------+--------
706-
| Sat May 10 23:59:12 1947 PDT | 1947 | 5 | 10 | 23 | 59 | 12
707-
| epoch | 1969 | 12 | 31 | 16 | 0 | 0
708-
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
709-
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
710-
(4 rows)
697+
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
698+
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
699+
< abstime 'Jan 14 14:00:00 1971'
700+
ORDER BY abstime, reltime;
701+
ten | abstime | reltime
702+
-----+------------------------------+---------------
703+
| Sat May 10 23:59:12 1947 PDT | @ 14 secs ago
704+
| Sat May 10 23:59:12 1947 PDT | @ 1 min
705+
| Sat May 10 23:59:12 1947 PDT | @ 5 hours
706+
| Sat May 10 23:59:12 1947 PDT | @ 10 days
707+
| Sat May 10 23:59:12 1947 PDT | @ 3 mons
708+
| epoch | @ 14 secs ago
709+
| epoch | @ 1 min
710+
| epoch | @ 5 hours
711+
| epoch | @ 10 days
712+
| epoch | @ 3 mons
713+
(10 rows)
714+
715+
-- these four queries should return the same answer
716+
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
717+
-- therefore, should not show up in the results.
718+
SELECT '' AS three, ABSTIME_TBL.*
719+
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
720+
< abstime 'Jan 14 14:00:00 1977';
721+
three | f1
722+
-------+------------------------------
723+
| Sun Jan 14 03:14:21 1973 PST
724+
| epoch
725+
| Sat May 10 23:59:12 1947 PDT
726+
(3 rows)
727+
728+
SELECT '' AS three, ABSTIME_TBL.*
729+
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
730+
< abstime 'Jan 14 14:00:00 1971';
731+
three | f1
732+
-------+------------------------------
733+
| Sun Jan 14 03:14:21 1973 PST
734+
| epoch
735+
| Sat May 10 23:59:12 1947 PDT
736+
(3 rows)
737+
738+
SELECT '' AS three, ABSTIME_TBL.*
739+
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
740+
< abstime 'Jan 14 14:00:00 1971';
741+
three | f1
742+
-------+------------------------------
743+
| Sun Jan 14 03:14:21 1973 PST
744+
| epoch
745+
| Sat May 10 23:59:12 1947 PDT
746+
(3 rows)
747+
748+
SELECT '' AS three, ABSTIME_TBL.*
749+
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
750+
< abstime 'Jan 14 14:00:00 1977';
751+
three | f1
752+
-------+------------------------------
753+
| Sun Jan 14 03:14:21 1973 PST
754+
| epoch
755+
| Sat May 10 23:59:12 1947 PDT
756+
(3 rows)
711757

712758
--
713759
-- Conversions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp