From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org
Subject: fixing pg_upgrade strings (was Re: pgsql: Add new files to nls.mk and add translation)
Date: Wed, 2 Aug 2017 23:47:08 -0400
Message-ID: <20170803034708.3neklemptkybqreu@alvherre.pgsql> (raw)
In-Reply-To: <E1dd69M-00055M-8q@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Peter Eisentraut wrote:
> Add new files to nls.mk and add translation markers
This reminds me that I noticed a few days ago another really serious
broken piece in pg_upgrade where check_required_directory() is incurring
in the ugliest case of string building I've ever seen. I didn't have
the courage to try to fix it back then, but I think we should dedicate
it some time. It does this:
pg_fatal("You must identify the directory where the %s.\n"
"Please use the %s command-line option or the %s environment variable.\n",
description, cmdLineOption, envVarName);
and the callsites are like this:
check_required_directory(&new_cluster.bindir, NULL, "PGBINNEW", "-B",
_("new cluster binaries reside"));
check_required_directory(&old_cluster.pgdata, &old_cluster.pgconfig,
"PGDATAOLD", "-d", _("old cluster data resides"));
note the declensions don't match even in the English original.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, peter_e@gmx.net, pgsql-hackers@postgresql.org
Subject: Re: fixing pg_upgrade strings (was Re: pgsql: Add new files to nls.mk and add translation)
In-Reply-To: <20170803034708.3neklemptkybqreu@alvherre.pgsql>
References: <E1dd69M-00055M-8q@gemulon.postgresql.org> <20170803034708.3neklemptkybqreu@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox