From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org, Daniel Gustafsson <daniel@yesql.se>
Subject: Re: format of pg_upgrade loadable_libraries warning
Date: Thu, 14 Nov 2019 16:06:52 -0300
Message-ID: <20191114190652.GA23586@alvherre.pgsql> (raw)
In-Reply-To: <20191007174757.GE4732@momjian.us>
On 2019-Oct-07, Bruce Momjian wrote:
> Uh, I looked at the pg_ugprade code and the error message is:
>
> pg_fatal("Your installation contains \"contrib/isn\" functions which rely on the\n"
> "bigint data type. Your old and new clusters pass bigint values\n"
> "differently so this cluster cannot currently be upgraded. You can\n"
> "manually upgrade databases that use \"contrib/isn\" facilities and remove\n"
> "\"contrib/isn\" from the old cluster and restart the upgrade. A list of\n"
> "the problem functions is in the file:\n"
> " %s\n\n", output_path);
>
> and the "in database" (which I have changed to capitalized "In database"
> in the attached patch), looks like:
>
> fprintf(script, "In database: %s\n", active_db->db_name);
>
> meaning it _isn't_ an output error message, but rather something that
> appears in an error file. I don't think either of these are translated.
> Is that wrong?
pg_fatal is a "gettext trigger" (see nls.mk), so that part of the
message is definitely translated. And the fprintf format string should
be decorated with _() in order to make translatable too; otherwise the
message is only half-translated when it appears in the pg_upgrade log,
which is not nice. This should look like:
if (!db_used)
{
/* translator: This is an error message indicator */
fprintf(script, _("In database: %s\n"), active_db->db_name);
db_used = true;
}
fprintf(script, " %s.%s\n",
BTW, how is one supposed to "manually upgrade databases that use
contrib/isb"? This part is not very clear.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, bruce@momjian.us, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, daniel@yesql.se
Subject: Re: format of pg_upgrade loadable_libraries warning
In-Reply-To: <20191114190652.GA23586@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