pgsql: Fix another join removal bug: the check on PlaceHolderVars was w

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix another join removal bug: the check on PlaceHolderVars was w
Дата
Msg-id E1OzdnA-0004nC-N9@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Fix another join removal bug: the check on PlaceHolderVars was w  (David Fetter <david@fetter.org>)
Список pgsql-committers
Fix another join removal bug: the check on PlaceHolderVars was wrong.

The previous coding would decide that join removal was unsafe upon finding
a PlaceHolderVar that needed to be evaluated at the inner rel and then used
above the join.  However, this fails to cover the case of PlaceHolderVars
that refer to both the inner rel and some other rels.  Per bug report from
Andrus.

Branch
------
REL9_0_STABLE

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

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c |   18 +++++++++++++-----
src/test/regress/expected/join.out        |   21 +++++++++++++++++++++
src/test/regress/sql/join.sql             |   15 +++++++++++++++
3 files changed, 49 insertions(+), 5 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Further fixes to the pg_get_expr() security fix in back branches
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix another join removal bug: the check on PlaceHolderVars was w