- Notifications
You must be signed in to change notification settings - Fork28
Commitc10e6bc
committed
Attempting to insert a value of 'now' into a datetime type
results in a bogus datetime value under AlphaLinux. (Note thatthe link to submit a port-specific bug on your website is broken)-Test Case:----------testdb=> create table dttest (dt datetime);testdb=> insert into dttest values ('now');--------------------------------------------------------------------------Solution:---------The basic problem is the typedefs of AbsoluteTime and RelativeTime,which are both 'int32'. These types appear to be used synonymouslywith the 'time_t' type, which on AlphaLinux is typedef'd as a 'longint', which is 64-bits (not 32). The solution included here fixesthe datetime type (it now passes the regression test), but does notpass the absolute and relative time regression tests. Presumably, amore thorough investigation of how these types are used is warranted.The included patch is from the v6.3.2 source, but can be applied tothe v6.4.2 source. Please note that there is also a RedHat-specificpatch distributed with the PostgreSQL source package from RedHatthat was applied first.Rich Edwards1 parente2c4d41 commitc10e6bc
File tree
3 files changed
+15
-10
lines changed- src
- backend/utils/adt
- include/utils
3 files changed
+15
-10
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
97 |
| - | |
| 97 | + | |
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
| 164 | + | |
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
196 |
| - | |
| 196 | + | |
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 |
| - | |
199 |
| - | |
| 198 | + | |
| 199 | + | |
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
|
Lines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 |
| - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 |
| |
29 | 34 |
| |
30 | 35 |
| |
|
0 commit comments
Comments
(0)