mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Set ecxt_scantuple correctly for tuple routing.
In 2ac3ef7a01
, we changed things so that
it's possible for a different TupleTableSlot to be used for partitioned
tables at successively lower levels. If we do end up changing the slot
from the original, we must update ecxt_scantuple to point to the new one
for partition key of the tuple to be computed correctly.
Reported by Rajkumar Raghuwanshi. Patch by Amit Langote.
Discussion: http://postgr.es/m/CAKcux6%3Dm1qyqB2k6cjniuMMrYXb75O-MB4qGQMu8zg-iGGLjDw%40mail.gmail.com
This commit is contained in:
@ -3192,9 +3192,7 @@ ExecFindPartition(ResultRelInfo *resultRelInfo, PartitionDispatch *pd,
|
||||
{
|
||||
int result;
|
||||
Oid failed_at;
|
||||
ExprContext *econtext = GetPerTupleExprContext(estate);
|
||||
|
||||
econtext->ecxt_scantuple = slot;
|
||||
result = get_partition_for_tuple(pd, slot, estate, &failed_at);
|
||||
if (result < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user