Re: About a recently-added message

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, euler(at)eulerto(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: About a recently-added message
Date: 2024-02-20 08:43:41
Message-ID: CAA4eK1LSkegBgi55R=kT5Kj_RSvrRDBG23rxj1qapMZ6F_aTMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 19, 2024 at 11:26 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Mon, Feb 19, 2024 at 11:10 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Thu, Feb 15, 2024 at 11:49 AM Kyotaro Horiguchi
> > <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > >
> > > At Thu, 15 Feb 2024 09:22:23 +0530, shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote in
> > > >
> > > > +1 on changing the msg(s) suggested way. Please find the patch for the
> > > > same. It also removes double quotes around the variable names
> > >
> > > Thanks for the discussion.
> > >
> > > With a translator hat on, I would be happy if I could determine
> > > whether a word requires translation with minimal background
> > > information. In this case, a translator needs to know which values
> > > wal_level can take. It's relatively easy in this case, but I'm not
> > > sure if this is always the case. Therefore, I would be slightly
> > > happier if "logical" were double-quoted.
> > >
> >
> > I see that we use "logical" in double quotes in various error
> > messages. For example: "wal_level must be set to \"replica\" or
> > \"logical\" at server start". So following that we can use the double
> > quotes here as well.
>
> Okay, now since we will have double quotes for logical. So do you
> prefer the existing way of giving error msg or the changed one.
>
> Existing:
> errmsg("bad configuration for slot synchronization"),
> errhint("wal_level must be >= logical."));
>
> errmsg("bad configuration for slot synchronization"),
> errhint("%s must be defined.", "primary_conninfo"));
>
> The changed one:
> errmsg("slot synchronization requires wal_level >= logical"));
>
> errmsg("slot synchronization requires %s to be defined",
> "primary_conninfo"));
>

I would prefer the changed ones as those clearly explain the problem
without additional information.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-02-20 08:59:08 Re: Possible to trigger autovacuum?
Previous Message torikoshia 2024-02-20 08:22:58 Re: Add new error_action COPY ON_ERROR "log"