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

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>, Ian Barwick <ian(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Jim Nasby <jim(at)nasby(dot)net>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Date: 2014-11-20 18:08:49
Message-ID: CAM3SWZTb8KSvTX97VNXKhYqz6AOdwrECe5a4-M5hRthRkgemnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 20, 2014 at 8:05 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I'm not particularly convinced that the "f1" -> "f2" example is a useful
> behavior, and I'm downright horrified by the "qty" -> "quantity" case.
> If the hint mechanism thinks the latter two are close enough together
> to suggest, it's going to be spewing a whole lot of utterly ridiculous
> suggestions. I'm going to be annoyed way more times than I'm going to
> be helped.

I happen to think that that isn't the case, because the number of
possible suggestions is fairly low anyway, and people don't tend to
make those kind of errors. Robert's examples of "ridiculous"
suggestions of "quantity" based on three letter strings other than
"qty" (e.g. "tit") were rather contrived. In fact, most 3 letter
strings will not offer a suggestion. 3 or more Equidistant would-be
matches tend to offer a lot of additional protection against bad
suggestions for these terse strings.

> The big picture is that this is more or less our first venture into
> heuristic suggestions. I think we should start slow with a very
> conservative set of heuristics. If it's a success maybe we can get more
> aggressive over time --- but if we go over the top here, the entire
> concept will be discredited in this community for the next ten years.

I certainly see your point here. It's not as if we have an *evolved*
understanding of the usability issues. Besides, as Robert pointed out,
most of the value of this patch is added by simple cases, like a
failure to pluralize or not pluralize, or the omission of an
underscore.

I still think we should charge half for deletion, but I will concede
that it's prudent to apply a more restrictive absolute quality final
test.
--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-11-20 18:30:44 Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Previous Message Robert Haas 2014-11-20 17:51:56 Re: group locking: incomplete patch, just for discussion