[COMMITTERS] pgsql: Fix RETURNING to work correctly with partition tuple routing.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема [COMMITTERS] pgsql: Fix RETURNING to work correctly with partition tuple routing.
Дата
Msg-id E1cUHMi-0006IR-CO@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix RETURNING to work correctly with partition tuple routing.

In ExecInsert(), do not switch back to the root partitioned table
ResultRelInfo until after we finish ExecProcessReturning(), so that
RETURNING projection is done using the partition's descriptor.  For
the projection to work correctly, we must initialize the same for each
leaf partition during ModifyTableState initialization.

Amit Langote

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/05bd889904e03479a7169b1c36e0e1db13fff7cb

Modified Files
--------------
src/backend/catalog/partition.c        |  8 ++++---
src/backend/commands/tablecmds.c       |  1 +
src/backend/executor/execMain.c        |  4 ++--
src/backend/executor/nodeModifyTable.c | 43 +++++++++++++++++++++++++++-------
src/include/catalog/partition.h        |  3 ++-
src/test/regress/expected/insert.out   | 24 ++++++++++++++++++-
src/test/regress/sql/insert.sql        | 16 ++++++++++++-
7 files changed, 82 insertions(+), 17 deletions(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: [COMMITTERS] pgsql: Fix failure to enforce partitioning contraint for internalparti
Следующее
От: Robert Haas
Дата:
Сообщение: [COMMITTERS] pgsql: Fix some problems in check_new_partition_bound().