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 CAHGQGwEKaPa3B8mqU5VUbAAbr26LE7scbDV2LAAivLOz8w65KQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On Tue, Nov 18, 2025 at 5:34 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Mon, Nov 17, 2025 at 8:44 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
> >
> > On Mon, Nov 17, 2025 at 04:04:17PM +0100, Daniel Gustafsson wrote:
> > > Oh right, I had forgotten about that, thanks for the reminder.  The patch as
> > > proposed is correct then.
> >
> > The patch is probably fine as-is, but this seems like a candidate for the
> > ClosestMatch stuff added by commit 5ac51c8.
>
> +1

Is there a guideline on when we should use the ClosestMatch machinery
instead of explicitly listing valid values? From the discussion in [1],
it seems appropriate when there are many possible values.
But should we generally replace all hints that list valid values
with ClosestMatch, or only in specific cases?

Regards,

[1] https://www.postgresql.org/message-id/flat/b1f9f399-3a1a-b554-283f-4ae7f34608e2@enterprisedb.com

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: vacuumdb: add --dry-run
Next
From: Corey Huinker
Date:
Subject: Re: Extended Statistics set/restore/clear functions.