Re: error messages in extended statistics

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: error messages in extended statistics
Date: 2019-05-30 15:10:29
Message-ID: 20190530150812.drb4w67uklatk7gb@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Тарасов Георгий Витальевич 2019-05-30 15:14:01 compiling PL/pgSQL plugin with C++
Previous Message DEV_OPS 2019-05-30 15:07:30 Re: Zedstore - compressed in-core columnar storage