Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions
Sugamoto Shinya <shinya34892@gmail.com>
From: Sugamoto Shinya <shinya34892@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Chao Li <li.evan.chao@gmail.com>, Daniel Gustafsson <daniel@yesql.se>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-12T13:23:34Z
Lists: pgsql-hackers
Attachments
- v2-0001-Added-error-hints-for-invalid-binary-encoding-names-.patch (application/octet-stream) patch v2-0001
On Wed, Nov 12, 2025 at 10:56 AM Fujii Masao <masao.fujii@gmail.com> wrote: > On Wed, Nov 12, 2025 at 10:10 AM Masahiko Sawada <sawada.mshk@gmail.com> > wrote: > > +1 for hard-coding the supported encoding list. I think it's a good > > start point. We can revisit the idea of dynamically constructing the > > encoding list if we're concerned about its maintenance cost. > > +1 > > Regards, > > -- > Fujii Masao > Thanks everyone for reviewing my proposal. I've hard-coded the valid list of encoding names. Also, I modified the hint string into like "Valid encodings are \"hex\", \"base64\", \"base64url\", and \"escape\"." by adding "and" before "escape". I attached my v2 patch to this message. Please let me know freely if you have any additional questions. Regards,
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