pgsql: Fix incorrect generation of whole-row variables in planner.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix incorrect generation of whole-row variables in planner.
Дата
Msg-id E1P8Hak-0006S8-Vl@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix incorrect generation of whole-row variables in planner.

A couple of places in the planner need to generate whole-row Vars, and were
cutting corners by setting vartype = RECORDOID in the Vars, even in cases
where there's an identifiable named composite type for the RTE being
referenced.  While we mostly got away with this, it failed when there was
also a parser-generated whole-row reference to the same RTE, because the
two Vars weren't equal() due to the difference in vartype.  Fix by
providing a subroutine the planner can call to generate whole-row Vars
the same way the parser does.

Per bug #5716 from Andrew Tipton.  Back-patch to 9.0 where one of the bogus
calls was introduced (the other one is new in HEAD).

Branch
------
REL9_0_STABLE

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

Modified Files
--------------
src/backend/nodes/makefuncs.c          |   88 ++++++++++++++++++++++++++++++++
src/backend/optimizer/prep/preptlist.c |    8 +--
src/backend/parser/parse_expr.c        |   76 +---------------------------
src/include/nodes/makefuncs.h          |    4 ++
src/test/regress/expected/rowtypes.out |   38 ++++++++++++++
src/test/regress/sql/rowtypes.sql      |   40 ++++++++++++++
6 files changed, 175 insertions(+), 79 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix incorrect generation of whole-row variables in planner.
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: Restructure the pg_upgrade code to use several global structures