Re: postgres_fdw hint messages

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-09-01T22:31:28Z
Lists: pgsql-hackers

Attachments

On Fri, Aug 26, 2022 at 12:35:38PM -0400, Tom Lane wrote:
> Peter also mentioned the possibility of "did you mean" with a closest
> match offered.  That seems like a reasonable idea if someone
> is motivated to create the code, which I'm not.
> 
> I vote for just dropping all these hints for now, while leaving the
> door open for anyone who wants to write closest-match-offering code.

Here is a quickly-hacked-together proof-of-concept for using Levenshtein
distances to determine which option to include in the hint.  Would
something like this suffice?  If so, I will work on polishing it up a bit.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Commits

  1. postgres_fdw: Remove useless DO block in test

  2. Adjust assorted hint messages that list all valid options.