| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
|---|---|
| To: | Peter Geoghegan <pg(at)heroku(dot)com> |
| Cc: | 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>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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-07-08 20:42:40 |
| Message-ID: | 20140708204240.GJ6390@eldon.alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Geoghegan 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
>
> That's because those two candidates come from a single RTE and have an
> equal distance -- you'd see both suggestions if you joined two tables
> with each candidate, assuming that each table being joined didn't
> individually have the same issue. I think that that's probably
> considered the correct behavior by most.
It seems pretty silly to me actually. Was this designed by a committee?
I agree with the general principle that showing a large number of
candidates (a la bash) is a bad idea, but failing to show two of them ...
Words fail me.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Moshe Jacobson | 2014-07-08 20:44:39 | Re: LEFT JOINs not optimized away when not needed |
| Previous Message | Tom Lane | 2014-07-08 20:40:28 | Re: LEFT JOINs not optimized away when not needed |