pgsql: Support flattening of empty-FROM subqueries and one-row VALUES t

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Support flattening of empty-FROM subqueries and one-row VALUES t
Дата
Msg-id E1YVtdR-0007CX-08@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Support flattening of empty-FROM subqueries and one-row VALUES tables.

We can't handle this in the general case due to limitations of the
planner's data representations; but we can allow it in many useful cases,
by being careful to flatten only when we are pulling a single-row subquery
up into a FROM (or, equivalently, inner JOIN) node that will still have at
least one remaining relation child.  Per discussion of an example from
Kyotaro Horiguchi.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f4abd0241de20d5d6a79b84992b9e88603d44134

Modified Files
--------------
src/backend/nodes/outfuncs.c              |    1 +
src/backend/optimizer/plan/planner.c      |    3 +-
src/backend/optimizer/prep/prepjointree.c |  452 +++++++++++++++++++++++++----
src/include/nodes/relation.h              |    1 +
src/include/optimizer/prep.h              |    2 +-
src/test/regress/expected/join.out        |   28 +-
src/test/regress/expected/rangefuncs.out  |   24 +-
src/test/regress/sql/join.sql             |   13 +-
src/test/regress/sql/rangefuncs.sql       |   13 +-
9 files changed, 466 insertions(+), 71 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix old bug in get_loop_count().
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: Add GUC to enable compression of full page images stored in WAL.