Re: Doing better at HINTing an appropriate column within errorMissingColumn()

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Peter Geoghegan <pg(at)heroku(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Ian Barwick <ian(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Jim Nasby <jim(at)nasby(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Date: 2014-06-17 22:15:58
Message-ID: 53A0BE1E.4000207@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18/06/14 10:05, Peter Geoghegan wrote:
> On Tue, Jun 17, 2014 at 2:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm not proposing an immutable cutoff. Something that scales with the
>> string length might be a good idea, or we could make it a multiple of
>> the minimum observed distance, or probably there are a dozen other things
>> we could do. I'm just saying that if we have an alternative at distance
>> 3, and another one at distance 4, it's not clear to me that we should
>> assume that the first one is certainly what the user had in mind.
>> Especially not if all the other alternatives are distance 10 or more.
> The patch just looks for the match with the lowest distance, passing
> the lowest observed distance so far as a "max" to the distance
> calculation function. That could have some value in certain cases.
> People have already raised general concerns about added cycles and/or
> clutter.
>
How about a list of miss spellings and the likely targets.
(grop, grap, ...) ==> (grep, grape, grope...)
type of thing? Possibly with some kind of adaptive learning algorithm.

I suspect that while this might be a useful research project, it is out
of scope for the current discussion!

Cheers,
Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2014-06-17 22:32:02 Re: Atomics hardware support table & supported architectures
Previous Message Peter Geoghegan 2014-06-17 22:05:51 Re: Doing better at HINTing an appropriate column within errorMissingColumn()