pgsql: Improve run-time partition pruning to handle any stableexpressi

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve run-time partition pruning to handle any stableexpressi
Дата
Msg-id E1fS5vI-0007eJ-BZ@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve run-time partition pruning to handle any stable expression.

The initial coding of the run-time-pruning feature only coped with cases
where the partition key(s) are compared to Params.  That is a bit silly;
we can allow it to work with any non-Var-containing stable expression, as
long as we take special care with expressions containing PARAM_EXEC Params.
The code is hardly any longer this way, and it's considerably clearer
(IMO at least).  Per gripe from Pavel Stehule.

David Rowley, whacked around a bit by me

Discussion: https://postgr.es/m/CAFj8pRBjrufA3ocDm8o4LPGNye9Y+pm1b9kCwode4X04CULG3g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/73b7f48f78d27b1baf1a6541cbaae0fe6bd6186d

Modified Files
--------------
src/backend/executor/execPartition.c          | 248 ++++++++++++++------------
src/backend/executor/nodeAppend.c             |  53 +++---
src/backend/nodes/copyfuncs.c                 |   7 +-
src/backend/nodes/outfuncs.c                  |  10 +-
src/backend/nodes/readfuncs.c                 |   7 +-
src/backend/partitioning/partprune.c          | 219 ++++++++++++++---------
src/include/executor/execPartition.h          |  38 ++--
src/include/nodes/primnodes.h                 |  12 +-
src/include/partitioning/partprune.h          |  20 ++-
src/test/regress/expected/partition_prune.out |  90 +++++++++-
src/test/regress/sql/partition_prune.sql      |  28 ++-
11 files changed, 461 insertions(+), 271 deletions(-)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix grammar in REVOKE documentation
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Relocate partition pruning structs to a saner place.