Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVKSP-00065Z-9r for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2019 19:07:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iVKSO-0004Rc-1X for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2019 19:07:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVKSN-0004RV-Kn for pgsql-hackers@lists.postgresql.org; Thu, 14 Nov 2019 19:07:03 +0000 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVKSJ-00069w-0Y for pgsql-hackers@lists.postgresql.org; Thu, 14 Nov 2019 19:07:02 +0000 Received: by mail-qv1-xf42.google.com with SMTP id n12so2820969qvt.1 for ; Thu, 14 Nov 2019 11:06:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=hpAyqWs4fg7bToaxaq+ONJUenGfUc3aV3WlVRecMrL4=; b=HDLJVzzJOdFPVUjXAAhdDpoXyfcaaNCjPZyGYvTSD8trpb48rXCheMsKI76cwEi4dg Yq09zGUoQxFgfMVULVfFVDsbmY5D15NI20PT/w4TXLVr0zaV/Xn39CB9GtKFUeckczTq lQq1LuKuBSgOQNaiSez+VtU2iHPdZdxOZq4jeCnU1tfdO+ihYXEywLJPOcVTvC3gRe5u dB6i307DYrthU1oLCn8iyvW2DC/nMZ1nBOYzOwypuADaJHQmPPf9ABJKV/2v3HG0Aptv ipxAs9o2/TFW+l3QXx7M9yJTtXk484eyQgq4XJM/SPqEWg2NprDSmBapM9VhmjyyjYQR 3NSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hpAyqWs4fg7bToaxaq+ONJUenGfUc3aV3WlVRecMrL4=; b=Ybu7dMZirnBgYSb3X/vJzw4NGR94LF8WZRbwUPCNe6BjePt4pUaFM3TVKxTNLRpIG2 C8m5g4t2nL45ThoHbCVvmdBZ4oP+QdzKUmrskgAnPo9q8CDBgr/3iZ54WJBy8ukn1Wc9 eZDuWl3kl/9qS5uQ8MDWhr6qJmshunfTsshsHxFS3R1n9jjHPbD+sX9uethkEWB8F98J BHwlW8BELHCxY2jNuTX6AdIzSwbw80UOaEe56esK/UD3AJ2QsMHGXtuktDurIDRTZnct RPpUPx7EBOlOA3UjTuUm6b82lbazvKsbM4Yx7aDB8BEojSq1xDr7c5jqM1lawUpXcUF/ 4opQ== X-Gm-Message-State: APjAAAUv1S2na36RknxXX4lTqYil0/dJ8NZ+Q2FJmUMy7gSFEbBjhpbS mlDs6LIHM6N10ESltsSYwnbEUxMFM3egci5BqHA+2fAfq8yaybQhyoYx+uJOCUvl84dsxE4/Hq+ uk6l89GhqqzebJo2h0NJE91mld9OPVoOn/ZNN+UOzb+yVstLxtM6ig2UIj+yMVyoxaLcr7fSKBR Uwfhx4+fFQ3hG+Fg== X-Google-Smtp-Source: APXvYqxW1Eypvm3c3x4X5mORL01LpKh5UP2fzARmqZWUpbRrjm4TBzOx4EsCWgWxFnrW9q0Vpi205w== X-Received: by 2002:a0c:c588:: with SMTP id a8mr9680457qvj.9.1573758416698; Thu, 14 Nov 2019 11:06:56 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([172.98.67.9]) by smtp.gmail.com with ESMTPSA id 132sm2921658qki.114.2019.11.14.11.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2019 11:06:56 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 20D8A302558; Thu, 14 Nov 2019 16:06:52 -0300 (-03) Date: Thu, 14 Nov 2019 16:06:52 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , Justin Pryzby , pgsql-hackers@lists.postgresql.org, Daniel Gustafsson Subject: Re: format of pg_upgrade loadable_libraries warning Message-ID: <20191114190652.GA23586@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191007174757.GE4732@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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