Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8d48d89d
Commit
8d48d89d
authored
Sep 15, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variant horology resultfiles are inconsistent with the test, again.
parent
8ae9ad1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
14 deletions
+60
-14
src/test/regress/expected/horology-no-DST-before-1970.out
src/test/regress/expected/horology-no-DST-before-1970.out
+60
-14
No files found.
src/test/regress/expected/horology-no-DST-before-1970.out
View file @
8d48d89d
...
...
@@ -736,20 +736,66 @@ SELECT '' as "54", d1 as timestamp,
--
-- abstime, reltime arithmetic
--
SELECT '' AS four, f1 AS abstime,
date_part('year', f1) AS year, date_part('month', f1) AS month,
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
date_part('minute', f1) AS minute, date_part('second', f1) AS second
FROM ABSTIME_TBL
WHERE isfinite(f1) and f1 <> abstime 'current'
ORDER BY abstime;
four | abstime | year | month | day | hour | minute | second
------+------------------------------+------+-------+-----+------+--------+--------
| Sat May 10 23:59:12 1947 PST | 1947 | 5 | 10 | 23 | 59 | 12
| epoch | 1969 | 12 | 31 | 16 | 0 | 0
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
(4 rows)
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
< abstime 'Jan 14 14:00:00 1971'
ORDER BY abstime, reltime;
ten | abstime | reltime
-----+------------------------------+---------------
| Sat May 10 23:59:12 1947 PST | @ 14 secs ago
| Sat May 10 23:59:12 1947 PST | @ 1 min
| Sat May 10 23:59:12 1947 PST | @ 5 hours
| Sat May 10 23:59:12 1947 PST | @ 10 days
| Sat May 10 23:59:12 1947 PST | @ 3 mons
| epoch | @ 14 secs ago
| epoch | @ 1 min
| epoch | @ 5 hours
| epoch | @ 10 days
| epoch | @ 3 mons
(10 rows)
-- these four queries should return the same answer
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
-- therefore, should not show up in the results.
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
< abstime 'Jan 14 14:00:00 1977';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PST
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
< abstime 'Jan 14 14:00:00 1971';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PST
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
< abstime 'Jan 14 14:00:00 1971';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PST
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
< abstime 'Jan 14 14:00:00 1977';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PST
(3 rows)
--
-- Conversions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment