postgresql/src
Tom Lane 8e5793ab60 Fix connection string handling in src/bin/scripts/ programs.
When told to process all databases, clusterdb, reindexdb, and vacuumdb
would reconnect by replacing their --maintenance-db parameter with the
name of the target database.  If that parameter is a connstring (which
has been allowed for a long time, though we failed to document that
before this patch), we'd lose any other options it might specify, for
example SSL or GSS parameters, possibly resulting in failure to connect.
Thus, this is the same bug as commit a45bc8a4f fixed in pg_dump and
pg_restore.  We can fix it in the same way, by using libpq's rules for
handling multiple "dbname" parameters to add the target database name
separately.  I chose to apply the same refactoring approach as in that
patch, with a struct to handle the command line parameters that need to
be passed through to connectDatabase.  (Maybe someday we can unify the
very similar functions here and in pg_dump/pg_restore.)

Per Peter Eisentraut's comments on bug #16604.  Back-patch to all
supported branches.

Discussion: https://postgr.es/m/16604-933f4b8791227b15@postgresql.org
2020-10-19 19:03:46 -04:00
..
backend Fix list-munging bug that broke SQL function result coercions. 2020-10-19 14:33:09 -04:00
bin Fix connection string handling in src/bin/scripts/ programs. 2020-10-19 19:03:46 -04:00
common Fix compilation warning in unicode_norm.c 2020-10-12 20:34:55 +09:00
fe_utils Standardize the printf format for st_size 2020-09-24 21:04:21 +02:00
include Fix list-munging bug that broke SQL function result coercions. 2020-10-19 14:33:09 -04:00
interfaces Update the Winsock API version requested by libpq. 2020-10-18 12:56:43 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Fixup some appendStringInfo and appendPQExpBuffer calls 2020-10-15 20:35:17 +13:00
port Minor cleanup for win32stat.c. 2020-10-12 11:13:02 -04:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Fix list-munging bug that broke SQL function result coercions. 2020-10-19 14:33:09 -04:00
timezone Update time zone data files to tzdata release 2020c. 2020-10-16 21:53:33 -04:00
tools Sync our copy of the timezone library with IANA release tzcode2020c. 2020-10-16 21:40:16 -04:00
tutorial Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Split Makefile symbol CFLAGS_VECTOR into two symbols. 2020-09-06 21:28:16 -04:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00