Re: Add hint message for check_log_destination()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: japinli(at)hotmail(dot)com, sawada(dot)mshk(at)gmail(dot)com, jian(dot)universality(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add hint message for check_log_destination()
Date: 2023-07-10 05:17:39
Message-ID: ZKuUczMaInahExR6@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 10, 2023 at 02:07:09PM +0900, Kyotaro Horiguchi wrote:
> At Mon, 10 Jul 2023 09:04:42 +0800, Japin Li <japinli(at)hotmail(dot)com> wrote in
>> Sorry for the late reply! I'm not sure. How can I know whether it is translatable?

Per the documentation:
https://www.postgresql.org/docs/devel/nls-programmer.html#NLS-GUIDELINES

Now, if you want to look at the shape of the messages, you could also
run something like a `make init-po` and look at the messages generated
in a .pot file.

> Honestly, I'm not sold on the idea that we need to exhaust ourselves
> providing an exhaustive list of usable keywords for users here. I
> believe that it is unlikely that these keywords will be used in
> different combinations each time without looking at the
> documentation. On top of that, consider "csvlog" as an example, -- it
> doesn't work as expected if logging_collector is off. Although this is
> documented, we don't give any warnings at startup. This seems like a
> bigger issue than the unusable keywords. (I don't mean to suggest to
> fix this, as usual.)
>
> In short, I think a simple message like '"xxx" cannot be used in this
> build' should suffice for keywords defined but unusable, and we should
> stick with "unknown" for the undefined ones.

Which is roughly what the existing GUC_check_errdetail() does as well,
but you indeed lose a bit of context because the option wanted is not
built. I am not convinced that there is something to change here.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-07-10 05:20:40 Re: Autogenerate some wait events code and documentation
Previous Message Kyotaro Horiguchi 2023-07-10 05:07:09 Re: Add hint message for check_log_destination()