pgsql: Improve plpgsql's error reporting for no-such-column cases.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve plpgsql's error reporting for no-such-column cases.
Дата
Msg-id E1PJCqY-000337-Lv@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve plpgsql's error reporting for no-such-column cases.

Given a column reference foo.bar, where there is a composite plpgsql
variable foo but it doesn't contain a column bar, the pre-9.0 coding would
immediately throw a "record foo has no field bar" error.  In 9.0 the parser
hook instead falls through to let the core parser see if it can resolve the
reference.  If not, you get a complaint about "missing FROM-clause entry
for table foo", which while in some sense correct isn't terribly helpful.
Complicate things a bit so that we can throw the old error message if
neither the core parser nor the hook are able to resolve the column
reference, while not changing the behavior in any other case.
Per bug #5757 from Andrey Galkin.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=b11accc9a9ade1b5da3ba0791b725dd29f9abeb7

Modified Files
--------------
src/pl/plpgsql/src/pl_comp.c |   43 +++++++++++++++++++++++++++++++++++------
1 files changed, 36 insertions(+), 7 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve plpgsql's error reporting for no-such-column cases.
Следующее
От: bloodnok@pgfoundry.org (User Bloodnok)
Дата:
Сообщение: veil - veil: Updates for version 9.1.12 release, to work with Postgres