aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/expected/reltime.out
blob: 383456ad739a7b4438595555c38068e6959aed3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
QUERY: CREATE TABLE RELTIME_TBL (f1 reltime);
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 1 minute');
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 5 hour');
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 10 day');
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 34 year');
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 3 months');
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago');
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime');
WARN:Bad reltime external representation 'badly formatted reltime'
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
WARN:Bad reltime external representation '@ 30 eons ago'
QUERY: SELECT '' AS six, RELTIME_TBL.*;
six|f1              
---+----------------
   |@ 1 minute      
   |@ 5 hours       
   |@ 10 days       
   |@ 34 years      
   |@ 3 months      
   |@ 14 seconds ago
(6 rows)

QUERY: SELECT '' AS five, RELTIME_TBL.*
   WHERE RELTIME_TBL.f1 <> '@ 10 days'::reltime;
five|f1              
----+----------------
    |@ 1 minute      
    |@ 5 hours       
    |@ 34 years      
    |@ 3 months      
    |@ 14 seconds ago
(5 rows)

QUERY: SELECT '' AS three, RELTIME_TBL.*
   WHERE RELTIME_TBL.f1 <= '@ 5 hours'::reltime;
three|f1              
-----+----------------
     |@ 1 minute      
     |@ 5 hours       
     |@ 14 seconds ago
(3 rows)

QUERY: SELECT '' AS three, RELTIME_TBL.*
   WHERE RELTIME_TBL.f1 < '@ 1 day'::reltime;
three|f1              
-----+----------------
     |@ 1 minute      
     |@ 5 hours       
     |@ 14 seconds ago
(3 rows)

QUERY: SELECT '' AS one, RELTIME_TBL.*
   WHERE RELTIME_TBL.f1 = '@ 34 years'::reltime;
one|f1        
---+----------
   |@ 34 years
(1 row)

QUERY: SELECT '' AS two, RELTIME_TBL.*
   WHERE RELTIME_TBL.f1 >= '@ 1 month'::reltime;
two|f1        
---+----------
   |@ 34 years
   |@ 3 months
(2 rows)

QUERY: SELECT '' AS five, RELTIME_TBL.*
   WHERE RELTIME_TBL.f1 > '@ 3 seconds ago'::reltime;
five|f1        
----+----------
    |@ 1 minute
    |@ 5 hours 
    |@ 10 days 
    |@ 34 years
    |@ 3 months
(5 rows)

QUERY: SELECT '' AS fifteen, r1.*, r2.*
   FROM RELTIME_TBL r1, RELTIME_TBL r2
   WHERE r1.f1 > r2.f1
   ORDER BY r1.f1, r2.f1;
fifteen|f1        |f1              
-------+----------+----------------
       |@ 1 minute|@ 14 seconds ago
       |@ 5 hours |@ 14 seconds ago
       |@ 5 hours |@ 1 minute      
       |@ 10 days |@ 14 seconds ago
       |@ 10 days |@ 1 minute      
       |@ 10 days |@ 5 hours       
       |@ 3 months|@ 14 seconds ago
       |@ 3 months|@ 1 minute      
       |@ 3 months|@ 5 hours       
       |@ 3 months|@ 10 days       
       |@ 34 years|@ 14 seconds ago
       |@ 34 years|@ 1 minute      
       |@ 34 years|@ 5 hours       
       |@ 34 years|@ 10 days       
       |@ 34 years|@ 3 months      
(15 rows)