pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: postgres_fdw hint messages
Date: Thu, 01 Sep 2022 19:08:49 -0400
Message-ID: <789102.1662073729@sss.pgh.pa.us> (raw)
In-Reply-To: <20220901223128.GA932597@nathanxps13>
References: <b1f9f399-3a1a-b554-283f-4ae7f34608e2@enterprisedb.com>
	<CA+TgmoY+BuSZm-Fbxx5zC6SuML=2F9YvaYuzVAJ=XyE65BnchQ@mail.gmail.com>
	<1929340.1661531738@sss.pgh.pa.us>
	<20220901223128.GA932597@nathanxps13>

Nathan Bossart <nathandbossart@gmail.com> writes:
> On Fri, Aug 26, 2022 at 12:35:38PM -0400, Tom Lane wrote:
>> 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.

Seems reasonable to me, but

(1) there probably needs to be some threshold of closeness, so we don't
offer "foobar" when the user wrote "huh"

(2) there are several places doing this now, and there will no doubt
be more later, so we need to try to abstract the logic so it can be
shared.

			regards, tom lane





view thread (18+ messages)  latest in thread

Message-ID: <789102.1662073729@sss.pgh.pa.us>
Permalink:  ../789102.1662073729@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/789102.1662073729@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, robertmhaas@gmail.com, peter.eisentraut@enterprisedb.com
  Subject: Re: postgres_fdw hint messages
  In-Reply-To: <789102.1662073729@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox