Re: postgres_fdw hint messages

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw hint messages
Date: 2022-09-03 01:03:48
Message-ID: YxKn9El8Km/3IZuI@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-09-03 01:06:58 Re: make additional use of optimized linear search routines
Previous Message Michael Paquier 2022-09-03 00:59:30 Re: json docs fix jsonb_path_exists_tz again