Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Sugamoto Shinya <shinya34892(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions
Date: 2025-11-19 14:17:52
Message-ID: CAHGQGwGvFhmsc9-74Z8+vPLGFou9FVL=QR541D8Fdnr5gU1DEA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 19, 2025 at 10:57 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> My point was a different one. It is generally preferable to separate
> translatable and untranslated things. So, as an example from elsewhere,
> instead of
>
> errhint("Use ALTER DOMAIN instead.");
>
> it would be better to use
>
> errhint("Use % instead.", "ALTER DOMAIN");
>
> Similarly, here I would prefer something along the lines of
>
> errhint("Valid values are \"%s\", \"%s\", and \"%s\".", "foo", "bar",
> "baz");
>
> So like it was done in patch v3 looks good to me.

Thanks for the explanation! I misunderstood your point.

So I will commit v3 patch.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-11-19 14:18:51 Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions
Previous Message Dean Rasheed 2025-11-19 14:08:14 Re: ON CONFLICT DO SELECT (take 3)