Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions
Date
Msg-id CAHGQGwGCMFAN3WXK=MB-1K3Jx=cPdyoO4VEVTbAn9NHXs8PEzg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions  (Sugamoto Shinya <shinya34892@gmail.com>)
List pgsql-hackers
On Wed, Nov 12, 2025 at 10:23 PM Sugamoto Shinya <shinya34892@gmail.com> wrote:
> 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.

Thanks for the updated patch! LGTM.

One minor comment: in v2 patch, it seems the encodings in the HINT message are
listed in the order they appear in the enclist struct. Wouldn't it be
clearer to list them
alphabetically, matching the order shown in the docs [1]: base64,
base64url, escape, and hex?

Regards,

[1] https://www.postgresql.org/docs/devel/functions-binarystring.html#ENCODE-FORMAT-BASE64

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: another autovacuum scheduling thread
Next
From: Michael Paquier
Date:
Subject: Re: [Patch] Windows relation extension failure at 2GB and 4GB