]> granicus.if.org Git - postgresql/commit
Use a real RT index when setting up partition tuple routing.
authorRobert Haas <rhaas@postgresql.org>
Tue, 18 Jul 2017 01:29:45 +0000 (21:29 -0400)
committerRobert Haas <rhaas@postgresql.org>
Tue, 18 Jul 2017 01:29:45 +0000 (21:29 -0400)
commitf81a91db4d1c2032632aa5df9fc14be24f5fe5ec
tree01ec760e37fcdc12db679add15f95e24f0d055dc
parent533463307bf67e1bb7acc345ba7ea535c6aebb78
Use a real RT index when setting up partition tuple routing.

Before, we always used a dummy value of 1, but that's not right when
the partitioned table being modified is inside of a WITH clause
rather than part of the main query.

Amit Langote, reported and reviewd by Etsuro Fujita, with a comment
change by me.

Discussion: http://postgr.es/m/ee12f648-8907-77b5-afc0-2980bcb0aa37@lab.ntt.co.jp
src/backend/commands/copy.c
src/backend/executor/execMain.c
src/backend/executor/nodeModifyTable.c
src/include/executor/executor.h
src/test/regress/expected/insert.out
src/test/regress/sql/insert.sql