- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit19fa977
committed
Dodge a compiler bug affecting timetz_zone/timetz_izone.
Use a modulo operator instead of implementing the same behaviorwith a loop. The loop solution is doubtless microscopicallyfaster for the typical case of only wrapping into the very nextday, but maybe not so much for large interval values. In anycase, timetz is such a backwater that it's doubtful anybodywould notice any performance change anyway.This avoids a compiler bug occurring in AIX's xlc, even in prettylate-model revisions.We did not have test coverage for the case where the initialresult->time value is negative, so add that.For the moment, install this only in HEAD. My plan is toback-patch the test case, and then the code change assuming thatbuildfarm testing proves the bug occurs in the back branches.(That seems pretty likely, but let's find out for sure.)Per buildfarm results from commits97957fd and2f04720.Thanks to Michael Paquier for the idea to use a modulo operationto replace the faulty loop.Discussion:https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com1 parent97550c0 commit19fa977
File tree
3 files changed
+32
-4
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+32
-4
lines changedLines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3083 | 3083 |
| |
3084 | 3084 |
| |
3085 | 3085 |
| |
| 3086 | + | |
3086 | 3087 |
| |
3087 | 3088 |
| |
3088 |
| - | |
3089 |
| - | |
| 3089 | + | |
| 3090 | + | |
3090 | 3091 |
| |
3091 | 3092 |
| |
3092 | 3093 |
| |
| |||
3116 | 3117 |
| |
3117 | 3118 |
| |
3118 | 3119 |
| |
| 3120 | + | |
3119 | 3121 |
| |
3120 | 3122 |
| |
3121 |
| - | |
3122 |
| - | |
| 3123 | + | |
| 3124 | + | |
3123 | 3125 |
| |
3124 | 3126 |
| |
3125 | 3127 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
304 | 304 |
| |
305 | 305 |
| |
306 | 306 |
| |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
307 | 328 |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 |
|
0 commit comments
Comments
(0)