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 1hWMi2-00059m-PC for pgsql-hackers@arkaria.postgresql.org; Thu, 30 May 2019 15:11:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hWMi1-0003AY-Gy for pgsql-hackers@arkaria.postgresql.org; Thu, 30 May 2019 15:11:13 +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 1hWMi1-0003AQ-5N for pgsql-hackers@lists.postgresql.org; Thu, 30 May 2019 15:11:13 +0000 Received: from mail-it1-x143.google.com ([2607:f8b0:4864:20::143]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWMhx-0003Cs-Ps for pgsql-hackers@lists.postgresql.org; Thu, 30 May 2019 15:11:12 +0000 Received: by mail-it1-x143.google.com with SMTP id i63so5647181ita.3 for ; Thu, 30 May 2019 08:11:09 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gU+cCqu0non5m1twTg3SYcT2GhJhlSugOAG4SNnx1W0=; b=lhB44IoX6VgTfYlUkaRhPsSR992u0Tz64XYS1UUALRX+KXa1tYtuHwOk3Ax37d7QYf C8VXszA4niglNi+Peg7VUD/RFlmKu5pQ5IfAaPDTz5ZTlwlLdvGRq1adJ+gzufWSwMN9 FE17wDKAMPrQjidsLJgMISN7BacWl4mOiaBep9VRgFg1hAPd+HD449UhpIsYguzioP66 z5S6Cwk4lcxgVd/JCvgsQlwpaF2WwE8MFAMW70nO9ekf4VWzyt/vzyZAYTmkaoeY82y5 OhGUgkHw1lDwkRPYaGzxLTrDJWSTr4KAwup2lFEkNV9OW2VMM8za0uMCrJ/lHU/MzoL+ M9YA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gU+cCqu0non5m1twTg3SYcT2GhJhlSugOAG4SNnx1W0=; b=IUify7Mb65xxp0uR9uvJcaCRDJD+4wquCHnLt6DhBL5vBFJ5z6MGHBAD7uaJQBdNnR Bq1KCfAGhpmrkeDvJgJOYfTAsbRuUWuZWm5COPyshfItJydTOB/SwzVBnK0LsJMl5bTl f2sD7p3vvmT7I+NPLaOHht9YozfpMpQ1rz7q1yC8XNpljcfodKPheDi8SpfczT+6X0CJ drzwZhHildnuB4UAT7PbUQVYwm6PzcxQj/S+yrDyVkxVgghnWq3g+0nWb+a0B2KOxkMb RuholWuAKycHWJ0bOK7DgPcVnX5c5qwC++yfqWavOswTkdoFdhRZcqPc8Qb3wHJ31wYJ Et8A== X-Gm-Message-State: APjAAAWeasooS77ZreIClNI8afCk3OMmScinrblf1xr5auYQ3RTTFQvA 3Ji+CNwm66HKo9cp2x3MzH3I3A== X-Google-Smtp-Source: APXvYqwsFou//vHthxAqAE3aPlM9ST9FMk6TlyjyPKr/y6xwtLkwPZxZVNOBJIuu5PcGpCwCp59UEQ== X-Received: by 2002:a02:3b55:: with SMTP id i21mr2786587jaf.128.1559229067830; Thu, 30 May 2019 08:11:07 -0700 (PDT) Received: from localhost (cst-prg-4-128.cust.vodafone.cz. [46.135.4.128]) by smtp.gmail.com with ESMTPSA id v139sm1216417itb.25.2019.05.30.08.11.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 08:11:06 -0700 (PDT) Date: Thu, 30 May 2019 17:10:29 +0200 From: Tomas Vondra To: Alvaro Herrera Cc: Tom Lane , Pg Hackers Subject: Re: error messages in extended statistics Message-ID: <20190530150812.drb4w67uklatk7gb@development> References: <20190504234233.l66mzyun4bykvdnq@development> <20190515161729.GA17418@alvherre.pgsql> <20190515163547.kcqn76j5lczzw5p2@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190515163547.kcqn76j5lczzw5p2@development> User-Agent: NeoMutt/20180716-1444-295967-dirty List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, May 15, 2019 at 06:35:47PM +0200, Tomas Vondra wrote: >On Wed, May 15, 2019 at 12:17:29PM -0400, Alvaro Herrera wrote: >>On 2019-May-05, Tomas Vondra wrote: >> >>>OK, so here is a patch, using elog() for all places except for the >>>input function, where we simply report we don't accept those values. >> >>Hmm, does this actually work? I didn't know that elog() supported >>errcode()/errmsg()/etc. I thought the macro definition didn't allow for >>that. >> > >D'oh, it probably does not. I might not have tried to compile it before >sending it to the mailing list, not sure ... :-( > >>Anyway, since the messages are still passed with errmsg(), they would >>still end up in the message catalog, so this patch doesn't help my case. >>I would suggest that instead of changing ereport to elog, you should >>change errmsg() to errmsg_internal(). That prevents the translation >>marking, and achieves the desired effect. (You can verify by running >>"make update-po" in src/backend/ and seeing that the msgid no longer >>appears in postgres.pot). >> >>>Now, what about backpatch? It's a small tweak, but it makes the life a >>>bit easier for translators ... >> >>+1 for backpatching. >> Pushed and backpatched, changing most places to elog(). -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services