aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_target.c
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2021-10-19 12:59:54 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2021-10-19 12:59:54 +0200
commit3e2f32b01d3b6868022c8381b28e8fc5399baeb9 (patch)
tree2b24d65de5c69e8cde0c6936e33092d6fc90dd96 /src/backend/parser/parse_target.c
parent121be6a665aaf64e0fe45b424cd26b53b384dc31 (diff)
downloadpostgresql-3e2f32b01d3b6868022c8381b28e8fc5399baeb9.tar.gz
postgresql-3e2f32b01d3b6868022c8381b28e8fc5399baeb9.zip
Fix bug in TOC file error message printing
If the blob TOC file cannot be parsed, the error message was failing to print the filename as the variable holding it was shadowed by the destination buffer for parsing. When the filename fails to parse, the error will print an empty string: ./pg_restore -d foo -F d dump pg_restore: error: invalid line in large object TOC file "": .. ..instead of the intended error message: ./pg_restore -d foo -F d dump pg_restore: error: invalid line in large object TOC file "dump/blobs.toc": .. Fix by renaming both variables as the shared name was too generic to store either and still convey what the variable held. Backpatch all the way down to 9.6. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/A2B151F5-B32B-4F2C-BA4A-6870856D9BDE@yesql.se Backpatch-through: 9.6
Diffstat (limited to 'src/backend/parser/parse_target.c')
0 files changed, 0 insertions, 0 deletions