Re: Add hint message for check_log_destination() - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Add hint message for check_log_destination()
Date
Msg-id CAD21AoBJs9fm87-T8eG_f5qETnJqsERufL8g7fA47hDjY0=f0A@mail.gmail.com
Whole thread Raw
In response to Re: Add hint message for check_log_destination()  (Japin Li <japinli@hotmail.com>)
Responses Re: Add hint message for check_log_destination()
List pgsql-hackers
On Fri, Jul 7, 2023 at 4:53 PM Japin Li <japinli@hotmail.com> wrote:
>
>
> On Fri, 07 Jul 2023 at 14:46, jian he <jian.universality@gmail.com> wrote:
> > On Fri, Jul 7, 2023 at 1:06 PM Japin Li <japinli@hotmail.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.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: POC, WIP: OR-clause support for indexes
Next
From: Yugo NAGATA
Date:
Subject: Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value