Re: postgres_fdw hint messages

2022-09-16 Thread Nathan Bossart
On Fri, Sep 16, 2022 at 03:54:53PM +0200, Peter Eisentraut wrote: > I don't think we need a verb there at all. I committed it without a verb. Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: postgres_fdw hint messages

2022-09-16 Thread Peter Eisentraut
On 13.09.22 21:02, Nathan Bossart wrote: On Tue, Sep 13, 2022 at 08:32:43AM +0200, Peter Eisentraut wrote: I notice that for column misspellings, the hint is phrased "Perhaps you meant X." whereas here we have "Did you mean X?". Let's make that uniform. Good point. I attached a new version o

Re: postgres_fdw hint messages

2022-09-13 Thread Nathan Bossart
On Tue, Sep 13, 2022 at 08:32:43AM +0200, Peter Eisentraut wrote: > I notice that for column misspellings, the hint is phrased "Perhaps you > meant X." whereas here we have "Did you mean X?". Let's make that uniform. Good point. I attached a new version of the patch that uses the column phrasing

Re: postgres_fdw hint messages

2022-09-12 Thread Peter Eisentraut
On 03.09.22 06:30, Nathan Bossart wrote: On Fri, Sep 02, 2022 at 10:06:54PM -0400, Tom Lane wrote: I think the distance limit of 5 is too loose though. I see that it accommodates examples like "passfile" for "password", which seems great at first glance; but it also allows fundamentally silly s

Re: postgres_fdw hint messages

2022-09-02 Thread Nathan Bossart
On Fri, Sep 02, 2022 at 10:06:54PM -0400, Tom Lane wrote: > I think the distance limit of 5 is too loose though. I see that > it accommodates examples like "passfile" for "password", which > seems great at first glance; but it also allows fundamentally > silly suggestions like "user" for "server"

Re: postgres_fdw hint messages

2022-09-02 Thread Tom Lane
Michael Paquier writes: > On Fri, Sep 02, 2022 at 02:26:09PM -0700, Nathan Bossart wrote: >> * 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. Howev

Re: postgres_fdw hint messages

2022-09-02 Thread Michael Paquier
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 dis

Re: postgres_fdw hint messages

2022-09-02 Thread Nathan Bossart
On Thu, Sep 01, 2022 at 04:31:20PM -0700, Nathan Bossart wrote: > 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 th

Re: postgres_fdw hint messages

2022-09-01 Thread Nathan Bossart
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 abstr

Re: postgres_fdw hint messages

2022-09-01 Thread Tom Lane
Nathan Bossart 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 Levensht

Re: postgres_fdw hint messages

2022-09-01 Thread Nathan Bossart
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, w

Re: postgres_fdw hint messages

2022-08-30 Thread Peter Eisentraut
On 25.08.22 15:42, Peter Eisentraut wrote: It's also questionable how useful this hint is in its current form, considering how long it is and that the options are in an implementation-dependent order. Possible changes: - Remove all the hints like this from foreign data commands. It appear

Re: postgres_fdw hint messages

2022-08-26 Thread Tom Lane
Robert Haas writes: > On Thu, Aug 25, 2022 at 9:42 AM Peter Eisentraut > wrote: >> HINT: Valid options in this context are: service, passfile, >> channel_binding, connect_timeout, dbname, host, hostaddr, port, options, >> application_name, keepalives, keepalives_idle, keepalives_interval, >> kee

Re: postgres_fdw hint messages

2022-08-26 Thread Robert Haas
On Thu, Aug 25, 2022 at 9:42 AM Peter Eisentraut wrote: > The postgres_fdw tests contain this (as amended by patch 0001): > > ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); > ERROR: invalid option "password" > HINT: Valid options in this context are: service, passfile, > channel_bi

Re: postgres_fdw hint messages

2022-08-25 Thread Ibrar Ahmed
On Thu, Aug 25, 2022 at 6:42 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > The postgres_fdw tests contain this (as amended by patch 0001): > > ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); > ERROR: invalid option "password" > HINT: Valid options in this context

Re: postgres_fdw hint messages

2022-08-25 Thread Ranier Vilela
Em qui., 25 de ago. de 2022 às 14:31, Ranier Vilela escreveu: > >The postgres_fdw tests contain this (as amended by patch 0001): > > >ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); > >ERROR: invalid option "password" > >HINT: Valid options in this context are: service, passfile, > >

re: postgres_fdw hint messages

2022-08-25 Thread Ranier Vilela
>The postgres_fdw tests contain this (as amended by patch 0001): >ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); >ERROR: invalid option "password" >HINT: Valid options in this context are: service, passfile, >channel_binding, connect_timeout, dbname, host, hostaddr, port, options, >a

postgres_fdw hint messages

2022-08-25 Thread Peter Eisentraut
The postgres_fdw tests contain this (as amended by patch 0001): ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw'); ERROR: invalid option "password" HINT: Valid options in this context are: service, passfile, channel_binding, connect_timeout, dbname, host, hostaddr, port, options, ap