postgresql/src
Daniel Gustafsson 998d060f3d 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
2021-10-19 12:59:54 +02:00
..
backend Block ALTER INDEX/TABLE index_name ALTER COLUMN colname SET (options) 2021-10-19 11:03:52 +09:00
bin Fix bug in TOC file error message printing 2021-10-19 12:59:54 +02:00
common Fix memory leak in pg_hmac 2021-10-01 22:47:05 +02:00
fe_utils Skip trailing whitespaces when parsing integer options 2021-07-27 10:39:05 +09:00
include Refactor LogicalTapeSet/LogicalTape interface. 2021-10-18 14:46:01 +03:00
interfaces Fix check for trapping exit() calls in libpq 2021-10-04 21:04:11 +02:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl plperl: update ppport.h to Perl 5.34.0. 2021-10-07 13:59:43 -04:00
port Treat ETIMEDOUT as indicating a non-recoverable connection failure. 2021-09-30 14:16:08 -04:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Block ALTER INDEX/TABLE index_name ALTER COLUMN colname SET (options) 2021-10-19 11:03:52 +09:00
timezone Doc: improve timezone/README's recipe for tracking Windows zones. 2021-10-06 13:38:42 -04:00
tools Fix WAL replay in presence of an incomplete record 2021-09-29 11:21:51 -03:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Provide error hint if TAP tests are not enabled 2021-10-04 11:46:29 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00