Craig Ringer <cr...@2ndquadrant.com> writes:
> We could only emit a useful HINT if we actually went and looked in the
> relevant catalog for a different-cased version. Which is pretty
> expensive.

There is actually a hint somewhat like that for the specific case of
misspelled column names in DML statements:

postgres=# create table foo ("Iris" int);
CREATE TABLE
postgres=# select iris from foo;
ERROR:  column "iris" does not exist
LINE 1: select iris from foo;
               ^
HINT:  Perhaps you meant to reference the column "foo.Iris".

but that's a bit different because the set of column names to be
considered is very constrained --- only columns belonging to tables
listed in FROM.  The parser has already sucked in the column name
lists for those tables, so no additional catalog fetches are needed.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to