Re: postgres_fdw hint messages - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: postgres_fdw hint messages
Date
Msg-id 20220901233120.GA934376@nathanxps13
Whole thread Raw
In response to Re: postgres_fdw hint messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: postgres_fdw hint messages
List pgsql-hackers
On Thu, Sep 01, 2022 at 07:08:49PM -0400, Tom Lane wrote:
> (1) there probably needs to be some threshold of closeness, so we don't
> offer "foobar" when the user wrote "huh"

Agreed.

> (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.

Will do.

I'm also considering checking whether the user-provided string is longer
than MAX_LEVENSHTEIN_STRLEN so that we can avoid the ERROR from
varstr_levenshtein().  Or perhaps varstr_levenshtein() could indicate that
the string is too long without ERROR-ing (e.g., by returning -1).  If the
user-provided string is too long, we'd just omit the hint.

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



pgsql-hackers by date:

Previous
From: samay sharma
Date:
Subject: Re: [RFC] building postgres with meson - v11
Next
From: Tom Lane
Date:
Subject: Can we avoid chdir'ing in resolve_symlinks() ?