forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3486bcf
committed
Fix pg_dump's logic for eliding sequence limits that match the defaults.
The previous coding here applied atoi() to strings that could representvalues too large to fit in an int. If the overflowed value happened tomatch one of the cases it was looking for, it would drop that limitvalue from the output, leading to incorrect restoration of the sequence.Avoid the unsafe behavior, and also make the logic cleaner by explicitlycalculating the default min/max values for the appropriate kind ofsequence.Reported and patched by Alexey Bashtanov, though I whacked his patcharound a bit. Back-patch to v10 where the faulty logic was added.Discussion:https://postgr.es/m/cb85a9a5-946b-c7c4-9cf2-6cd6e25d7a33@imap.cc1 parent9a89f6d commit3486bcf
1 file changed
+29
-24
lines changedLines changed: 29 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16843 | 16843 |
| |
16844 | 16844 |
| |
16845 | 16845 |
| |
| 16846 | + | |
| 16847 | + | |
| 16848 | + | |
| 16849 | + | |
16846 | 16850 |
| |
16847 | 16851 |
| |
16848 | 16852 |
| |
| |||
16912 | 16916 |
| |
16913 | 16917 |
| |
16914 | 16918 |
| |
16915 |
| - | |
16916 |
| - | |
16917 |
| - | |
16918 |
| - | |
16919 |
| - | |
16920 |
| - | |
16921 |
| - | |
| 16919 | + | |
| 16920 | + | |
16922 | 16921 |
| |
16923 | 16922 |
| |
16924 |
| - | |
16925 |
| - | |
16926 |
| - | |
16927 |
| - | |
| 16923 | + | |
| 16924 | + | |
16928 | 16925 |
| |
16929 | 16926 |
| |
16930 | 16927 |
| |
16931 |
| - | |
16932 |
| - | |
16933 |
| - | |
16934 |
| - | |
| 16928 | + | |
| 16929 | + | |
16935 | 16930 |
| |
16936 | 16931 |
| |
16937 | 16932 |
| |
16938 |
| - | |
16939 |
| - | |
| 16933 | + | |
| 16934 | + | |
| 16935 | + | |
| 16936 | + | |
| 16937 | + | |
| 16938 | + | |
| 16939 | + | |
| 16940 | + | |
16940 | 16941 |
| |
16941 |
| - | |
16942 |
| - | |
| 16942 | + | |
| 16943 | + | |
| 16944 | + | |
| 16945 | + | |
| 16946 | + | |
| 16947 | + | |
16943 | 16948 |
| |
16944 |
| - | |
16945 |
| - | |
16946 |
| - | |
16947 |
| - | |
16948 |
| - | |
| 16949 | + | |
| 16950 | + | |
| 16951 | + | |
| 16952 | + | |
| 16953 | + | |
16949 | 16954 |
| |
16950 | 16955 |
| |
16951 | 16956 |
| |
|
0 commit comments
Comments
(0)