Re: Improving "missing FROM-clause entry" message

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Improving "missing FROM-clause entry" message
Дата
Msg-id 10603.1135618775@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Improving "missing FROM-clause entry" message  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Improving "missing FROM-clause entry" message  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> I'm thinking about whether we can't improve the message for "missing
> FROM-clause entry" to somehow account for situations where the table
> does exist in the query but it's referenced from an improper place,
> as in bug #2130 (filed a couple hours ago, not yet visible in mail list
> archives):
> SELECT ... FROM a, b LEFT JOIN c ON (c.task_id=a.task_id ...

On further investigation, this is arguably a regression in 8.1.
Every PG release back to 7.2 has responded to this query with

NOTICE:  adding missing FROM-clause entry for table "a"
ERROR:  JOIN/ON clause refers to "a", which is not part of JOIN

In 8.1, where add_missing_from defaults to false, you get the first
line as an ERROR and so the much-more-useful specific message doesn't
appear.  I think we need to do something about this.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Improving "missing FROM-clause entry" message
Следующее
От: Bruce Momjian
Дата:
Сообщение: Online backup vs Continuous backup