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 1hQwb8-0005A2-On for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2019 16:17:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQwb7-0001dJ-Fn for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2019 16:17:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQwb6-0001dC-Uw for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2019 16:17:41 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQwaz-0008T5-QR for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2019 16:17:39 +0000 Received: by mail-qk1-x741.google.com with SMTP id g190so330640qkf.8 for ; Wed, 15 May 2019 09:17:33 -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=Z0IJLbzLD9uYq7esnmv7IMps/gT5F15rWysb17LaCBU=; b=oK3Kuk0PH2yqn8dKpph23H0+Yxl6ZwAQbIKZbUE7guJ2zLi09ZhjW+np3pgEUfqZkS dy85zweis+YKBoIxUiC4KY8sHDW866S/90Bv9AME+eR9JSbWsf8OUVEnklw/76kGuOI2 0PzzU9kX5LesIHVDQcxvUIhNvRBWOrarpfQnf2YMJCa0YaGrAoQQD83PY/psE3PCNe20 xo7QVKv0lAceQUvRk81kj9aLc70xOsBopolhPptXpFjFr+3hBTGav9PYDDyHMAGIr8kh erFoP/5bQlfflzmkwIuFAFzMligOmrVDpWHu2S5H9KcMRMJ33a+1sGMVEN6kK90WAwSE 4AHw== 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=Z0IJLbzLD9uYq7esnmv7IMps/gT5F15rWysb17LaCBU=; b=iH98Jzv+8Cf/PsMSI/Eizt/+sqmEJ1W+HMO4OPX9aan/WvQAeZVN4mVD+d+6Gq8nuY Jxgq+pU2pSXfwoZGBKgJGnFlopNmgsmdLkkkNLbhenOOTGbHGGU4J/+V38YtiIgVczlT e9tIGNw5IWiOxyYOzf+cl2sKQOL7OI9h9MAQ7Fr33IQ/YtLIqKxfdSaJwXlviyzVtc1D CnJOnBV5/IsJk2BS6M3R2+0e2ClB2DuCuZIDhhHgmNNkY53CN839nQPK12oMDEPJgAkb vyoXD/vLnWT7G60gJJWfoSuhxrO+NA6FhxBtmjJ1XBmLSozhueqQ4RY/6uQZTlGOOSXp 3qPw== X-Gm-Message-State: APjAAAX7WukzceBb3xdsvORN+Amdqy7DG+noaDtNk3Zx0yuUsi91fylo ZZ/7m2MisOnh3dbxKIZVHjo0Zw== X-Google-Smtp-Source: APXvYqwx4I5PoHqjb1Oa0zWiG9JCHWNaK2MQKQU3hvqwUsJVjILpFBnz9xeewU2f4vL21V1h+urZSg== X-Received: by 2002:a37:7381:: with SMTP id o123mr32880608qkc.96.1557937052924; Wed, 15 May 2019 09:17:32 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id y13sm1890435qtc.21.2019.05.15.09.17.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2019 09:17:31 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 5AAB4120A0C; Wed, 15 May 2019 12:17:29 -0400 (-04) Date: Wed, 15 May 2019 12:17:29 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: Tom Lane , Pg Hackers Subject: Re: error messages in extended statistics Message-ID: <20190515161729.GA17418@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190504234233.l66mzyun4bykvdnq@development> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. 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. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services