Don't emit garbage "\[un]restrict (null)" commands in pg_dump.

_reconnectToDB() failed to consider the possibility that it could
be called without any restrict_key set.  This is reachable while
generating the "restore.sql" file in tar dump mode, which nobody
noticed because that file is mostly unused (and nothing really
bad happens anyway unless you specified --inserts mode).  But
I wonder if there are other code paths that reach the issue.

Bug: #19718
Reported-by: Pavel Kopylov <[email protected]>
Author: Pavel Kopylov <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b349762fdeb7193b55fd1ae44a2e79903f13b14a

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Reply via email to