aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/matview.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-02-20 11:23:33 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-02-20 11:23:42 -0500
commit3486bcf9e89d87b59d0e370af098fda38be97209 (patch)
tree6604fc37dc6f530350ab621285876d3a9b2cdc59 /src/backend/commands/matview.c
parent9a89f6d85467be362f4d426c76439cea70cd327f (diff)
downloadpostgresql-3486bcf9e89d87b59d0e370af098fda38be97209.tar.gz
postgresql-3486bcf9e89d87b59d0e370af098fda38be97209.zip
Fix pg_dump's logic for eliding sequence limits that match the defaults.
The previous coding here applied atoi() to strings that could represent values too large to fit in an int. If the overflowed value happened to match one of the cases it was looking for, it would drop that limit value from the output, leading to incorrect restoration of the sequence. Avoid the unsafe behavior, and also make the logic cleaner by explicitly calculating the default min/max values for the appropriate kind of sequence. Reported and patched by Alexey Bashtanov, though I whacked his patch around a bit. Back-patch to v10 where the faulty logic was added. Discussion: https://postgr.es/m/cb85a9a5-946b-c7c4-9cf2-6cd6e25d7a33@imap.cc
Diffstat (limited to 'src/backend/commands/matview.c')
0 files changed, 0 insertions, 0 deletions