Re: postgres_fdw hint messages - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: postgres_fdw hint messages
Date
Msg-id YxKn9El8Km/3IZuI@paquier.xyz
Whole thread Raw
In response to Re: postgres_fdw hint messages  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: postgres_fdw hint messages
List pgsql-hackers
On Fri, Sep 02, 2022 at 02:26:09PM -0700, Nathan Bossart wrote:
> Here is a new patch.  Two notes:
>
> * I considered whether to try to unite this new functionality with the
> existing stuff in parse_relation.c, but the existing code looked a bit too
> specialized.
>
> * I chose a Levenshtein distance of 5 as the threshold of closeness for the
> hint messages.  This felt lenient, but it should hopefully still filter out
> some of the more ridiculous suggestions.  However, it's still little more
> than a wild guess, so if folks think the threshold needs to be higher or
> lower, I'd readily change it.

Hmm.  FWIW I would tend toward simplifying all this code and just drop
all the hints rather than increasing the dependency to more
levenshtein calculations in those error code paths, which is what
Peter E has posted.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: json docs fix jsonb_path_exists_tz again
Next
From: Michael Paquier
Date:
Subject: Re: make additional use of optimized linear search routines