Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Daniel Gustafsson <daniel@yesql.se>,
Sugamoto Shinya <shinya34892@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>,
Masahiko Sawada <sawada.mshk@gmail.com>, Chao Li <li.evan.chao@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-19T14:17:52Z
Lists: pgsql-hackers
On Wed, Nov 19, 2025 at 10:57 PM Peter Eisentraut <peter@eisentraut.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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add HINT listing valid encodings to encode() and decode() errors.
- 99780da72096 19 (unreleased) landed
-
Revise GUC names quoting in messages again
- 17974ec25946 17.0 cited
-
doc: Mention how to use quotes with GUC names in error messages
- a243569bf65c 17.0 cited
-
Adjust assorted hint messages that list all valid options.
- 5ac51c8c9e44 16.0 cited