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 1hQwt0-0005wU-Td for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2019 16:36:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQwsy-0000l4-EU for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2019 16:36:08 +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 1hQwsy-0000kn-5v for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2019 16:36:08 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQwss-0001ZI-KX for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2019 16:36:07 +0000 Received: by mail-wm1-x341.google.com with SMTP id i3so690139wml.4 for ; Wed, 15 May 2019 09:36:02 -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=yP7GmoehyzoReLiij69GGL6WwbxUJXoJWcfUc88nrME=; b=nkUORFkZseK0nt2qAuOhcQfD2D2j5QgXorVB2yzLUH+ERAGZoIXnVzDOsZUNOqsddh Y+9kV+PoGJ8LI3YhrFosFuyHMcMneD+bk99Wv3l+WsiXwRiPaEJpE84UKRPzYbqIU/rJ Vl0BOGyNTN2irP8+vH4qRIn+c8NHJjO/PIXD7MonBtc9iV03dUh0Turx5ybgASnSp+H+ X4/cbvhb7FEKIBQVDho5unrYBBSomJm/tRJepulEb7/5l5bDcGhVxFXoaZ7I/j7NPEaj 72EpD0xSYgxkduYcRKh80yMX4rk8cgjoe8hxJ7GVspf8E41w8yckDr/xrywpOZ8o6PCb x/SA== 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=yP7GmoehyzoReLiij69GGL6WwbxUJXoJWcfUc88nrME=; b=rfarP59IMOppOLSI/hhYt4jiwluX22eNIxOOFWWX3nBl56yRuO44dgkRoPtbF0uglL 6BnMz5W4ebRbkwb4qxGZsbui2S41jjOTFlkovEJmaCcJyBJw13ykEKrdxhC3We7oPYco YgWSIqN/rdZzEYMRvij/75KzhtBAfR+DKlAYgFYlDmpFxQJlyHsxc6y6Wss6t1nf8WzG GY3eYZ/VDtqf1aGjZYFtbwKhs4HH/F1xFL6Q7sNO7jmE/0dX/O1WhBqhWhUZ1OD3c/J5 as9eDFgLkW6X2IcrVMTEfxoileG/MjJcVxKKls8ONbiv68E3SSOgDDfVM2m8NM49zH9+ ongQ== X-Gm-Message-State: APjAAAVnwQN3eJhQgkqAXewTeaQ+muS+vi4y1pIHZgqV8mrsTN523hT5 ExL7or6Wyg7Q4aQX/cmoF1Ui6sJktnU= X-Google-Smtp-Source: APXvYqz+a9pdIMUBKtHj1YpmKIqjehtmI3roByR1ZdGNWQLEiEjuq9drop+bOQRLvaRm6RQNKhOufg== X-Received: by 2002:a7b:ce8c:: with SMTP id q12mr7119678wmj.33.1557938160781; Wed, 15 May 2019 09:36:00 -0700 (PDT) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id y17sm2599027wrp.70.2019.05.15.09.35.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 15 May 2019 09:35:50 -0700 (PDT) Date: Wed, 15 May 2019 18:35:47 +0200 From: Tomas Vondra To: Alvaro Herrera Cc: Tom Lane , Pg Hackers Subject: Re: error messages in extended statistics Message-ID: <20190515163547.kcqn76j5lczzw5p2@development> References: <20190504234233.l66mzyun4bykvdnq@development> <20190515161729.GA17418@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190515161729.GA17418@alvherre.pgsql> 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 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. > OK. -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services