Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd78G-0002LN-3G for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Aug 2017 03:49:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dd78F-00054C-M8 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Aug 2017 03:49:07 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dd76i-0000HX-1s for pgsql-hackers@postgresql.org; Thu, 03 Aug 2017 03:47:32 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dd76e-0005X8-AP for pgsql-hackers@postgresql.org; Thu, 03 Aug 2017 03:47:31 +0000 Received: by mail-qk0-x22f.google.com with SMTP id d136so1143549qkg.3 for ; Wed, 02 Aug 2017 20:47:27 -0700 (PDT) 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=IwGwI6wE7jNBSKCgCoshSC/+WvYXCIf/NJYfE46Vi5M=; b=TENdihYe5sK9iAjggtukWxzX1ESsiAkFtKmEYRVLCaqxwCDWeHedLZuAOqHQaetnY9 XUk7ogU8tBhuY+vpp4/SoqF6y35h9C1/yWbEuv7s6QOGzupGQWHrX3CsuhiWEv8foG3W 3cBRmNoli2eKkf30O1XpO8CFAr7qQizNPMox4DtIMTcP6awrRXYNDX8ugNANJ0AyamIt 7xyjz2hBY8e1syt/g1jq5242owX+SEkXdw/rgTmwmvHldDw3jRfDlUBoI40RvmjO7s0m eyy6TxfkW1iv9VBuIOk4BTRQHWll/efLYn39Th1jNhxetfVvTcyI09YOGQBeIJCGPucL bWUA== 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=IwGwI6wE7jNBSKCgCoshSC/+WvYXCIf/NJYfE46Vi5M=; b=ohmyxzMCxJxWFHDDc9Ai2YrfBrBOPCCnH1n+oKQOZG4e6tyZ56ulKDyPhruQr0kejW O95dlH+jQjw8Q08VUhTSZX4smt9qoWoKd7/KTyL/pfLJ9A8X5b7L7ikWseGB28DdkMf9 zUaRgm2I/blBlhWtjZZWaKmNutvExKAtsh/IRoxJEL46yBoqeSNXKLg8k0eUzGu9nNg4 LM5zvUPAx6IBk08mRYMCM2o5Wc0aJgQOJ0/3bh0+mC51stEOWGTOgxW3DyD9nt8vWeG0 +o9fxXTdse8X/KGCfYdaoqaqPYmq4jaz7tbEP7swBknHGjPp+/OQYbdRTIvs/GjD9jNq R9YA== X-Gm-Message-State: AHYfb5j1EqAyYlQLI/6LmVhrPPt5KxkBEY+XAPFNREIIrnPNBi5SPDCY wXbm0f0BCOZOHImqieg= X-Received: by 10.55.128.1 with SMTP id b1mr716754qkd.76.1501732046560; Wed, 02 Aug 2017 20:47:26 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.217.211.14]) by smtp.gmail.com with ESMTPSA id c204sm16891842qkb.32.2017.08.02.20.47.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Aug 2017 20:47:25 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id C4F6311A0; Wed, 2 Aug 2017 23:47:08 -0400 (-04) Date: Wed, 2 Aug 2017 23:47:08 -0400 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers@postgresql.org Subject: fixing pg_upgrade strings (was Re: pgsql: Add new files to nls.mk and add translation) Message-ID: <20170803034708.3neklemptkybqreu@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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