Re: [HACKERS] Postgresql gives error that role goes not exists while it exists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Postgresql gives error that role goes not exists while it exists
Дата
Msg-id 12705.1507044035@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Postgresql gives error that role goes not exists whileit exists  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Craig Ringer <craig@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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sokolov Yura
Дата:
Сообщение: Re: [HACKERS] Two pass CheckDeadlock in contentent case
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] [PATCH] Incremental sort