Re: Add hint message for check_log_destination()

From: Japin Li <japinli(at)hotmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add hint message for check_log_destination()
Date: 2023-07-07 11:23:47
Message-ID: MEYP282MB1669A108ABC063143AAAB65DB62DA@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Fri, 07 Jul 2023 at 16:21, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> On Fri, Jul 7, 2023 at 4:53 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
>>
>>
>> On Fri, 07 Jul 2023 at 14:46, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>> > On Fri, Jul 7, 2023 at 1:06 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
>> >>
>> >>
>> >> Hi, hackers
>> >>
>> >> When I try to change log_destination using ALTER SYSTEM with the wrong value,
>> >> it complains of the "Unrecognized key word" without available values. This
>> >> patch tries to add a hint message that provides available values for
>> >> log_destination. Any thoughts?
>
> +1
>
> + appendStringInfo(&errhint, "\"stderr\"");
> +#ifdef HAVE_SYSLOG
> + appendStringInfo(&errhint, ", \"syslog\"");
> +#endif
> +#ifdef WIN32
> + appendStringInfo(&errhint, ", \"eventlog\"");
> +#endif
> + appendStringInfo(&errhint, ", \"csvlog\", and \"jsonlog\"");
>
> I think using appendStringInfoString() is a bit more natural and faster.
>

Thanks for your review! Fixed as per your suggession.

Attachment Content-Type Size
v3-0001-Add-hint-message-for-check_log_destination.patch text/x-diff 1.2 KB
unknown_filename text/plain 25 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-07-07 11:30:58 Re: remaining sql/json patches
Previous Message Thom Brown 2023-07-07 11:21:03 Re: Disabling Heap-Only Tuples