On Tue, Jul 8, 2014 at 6:58 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > 6) Sometimes no hints are returned... Even in simple cases like this one: > =# create table foo (aa int, bb int); > CREATE TABLE > =# select ab from foo; > ERROR: 42703: column "ab" does not exist > LINE 1: select ab from foo; > ^ > LOCATION: errorMissingColumn, parse_relation.c:3123
In this example, it seems obvious that both "aa" and "bb" should be suggested when they are not. But what if there were far more columns, as might be expected in realistic cases (suppose all other columns have at least 3 characters)? That's another kettle of fish. The assumption that it's probably one of those two equally distant columns is now on very shaky ground. After all, the user can only have meant one particular column. If we apply a limited kind of Turing test to this second case, how does the most recent revision's algorithm do? What would a human suggest? I'm pretty sure the answer is that the human would shrug. Maybe he or she would say "I guess you might have meant one of either aa or bb, but that really isn't obvious at all". That doesn't inspire much confidence. Now, maybe I should be more optimistic about it being one of the two because there are only two possibilities to begin with. That seems pretty dubious, though. In general I find it much more plausible based on what we know that the user should rethink everything. And, as Tom pointed out, showing nothing conveys something in itself once users have been trained to expect something. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers