forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1748379
committed
Detect more overflows in timestamp[tz]_pl_interval.
In commit25cd2d6 I (tgl) opined that "The additions of the monthsand microseconds fields could also overflow, of course. However,I believe we need no additional checks there; the existing rangechecks should catch such cases". This is demonstrably wrong howeverfor the microseconds field, and given that discovery it seems prudentto be paranoid about the months addition as well.Report and patch by Joseph Koshakow. As before, back-patch to allsupported branches. (However, the test case doesn't work beforev15 because we didn't allow wider-than-int32 numbers in intervalliterals. A variant test could probably be built that fits withinthat restriction, but it didn't seem worth the trouble.)Discussion:https://postgr.es/m/CAAvxfHf77sRHKoEzUw9_cMYSpbpNS2C+J_+8Dq4+0oi8iKopeA@mail.gmail.com1 parent6189a0d commit1748379
1 file changed
+16
-4
lines changedLines changed: 16 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2859 | 2859 |
| |
2860 | 2860 |
| |
2861 | 2861 |
| |
2862 |
| - | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
2863 | 2866 |
| |
2864 | 2867 |
| |
2865 | 2868 |
| |
| |||
2911 | 2914 |
| |
2912 | 2915 |
| |
2913 | 2916 |
| |
2914 |
| - | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
2915 | 2921 |
| |
2916 | 2922 |
| |
2917 | 2923 |
| |
| |||
2973 | 2979 |
| |
2974 | 2980 |
| |
2975 | 2981 |
| |
2976 |
| - | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
2977 | 2986 |
| |
2978 | 2987 |
| |
2979 | 2988 |
| |
| |||
3032 | 3041 |
| |
3033 | 3042 |
| |
3034 | 3043 |
| |
3035 |
| - | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
3036 | 3048 |
| |
3037 | 3049 |
| |
3038 | 3050 |
| |
|
0 commit comments
Comments
(0)