Introduce a psql "\connect -reuse-previous=on|off" option.

Noah Misch <noah@leadboat.com>

Commit: cf7e5f55bfd56fc811018c5c56fd5fba6e9b87be
Author: Noah Misch <noah@leadboat.com>
Date: 2016-08-08T14:07:53Z
Releases: 9.1.23
Introduce a psql "\connect -reuse-previous=on|off" option.

The decision to reuse values of parameters from a previous connection
has been based on whether the new target is a conninfo string.  Add this
means of overriding that default.  This feature arose as one component
of a fix for security vulnerabilities in pg_dump, pg_dumpall, and
pg_upgrade, so back-patch to 9.1 (all supported versions).  In 9.3 and
later, comment paragraphs that required update had already-incorrect
claims about behavior when no connection is open; fix those problems.

Security: CVE-2016-5424

Files

PathChange+/−
doc/src/sgml/ref/psql-ref.sgml modified +12 −9
src/bin/psql/command.c modified +76 −34
src/bin/psql/startup.c modified +1 −1