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: Daniel Gustafsson <daniel@yesql.se>
Cc: Sugamoto Shinya <shinya34892@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Chao Li <li.evan.chao@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-17T14:59:39Z
Lists: pgsql-hackers
On Mon, Nov 17, 2025 at 11:30 PM Daniel Gustafsson <daniel@yesql.se> wrote:
>
> > On 17 Nov 2025, at 15:08, Sugamoto Shinya <shinya34892@gmail.com> wrote:
>
> > I ordered the valid encodings alphabetically and extracted those into separate parameters.
>
> LGTM.  Per project style I don't think we should quote the names of encodings
> since they are visibly not English words (see commit a243569bf65c5 which deals
> with variable names, but I think it applies here as well)

It looks like the message-style rule added in commit a243569bf65c5
applies only to
configuration parameter names, right? And it seems that rule was later revised
by commit 17974ec2594. Is that correct?

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 →
  1. Add HINT listing valid encodings to encode() and decode() errors.

  2. Revise GUC names quoting in messages again

  3. doc: Mention how to use quotes with GUC names in error messages

  4. Adjust assorted hint messages that list all valid options.