diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-07-24 18:08:08 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-07-24 18:08:08 -0400 |
commit | 4132dbec69dd4d437e132e57a74a98a40cdcf776 (patch) | |
tree | 03fdb89eac9bcc736c3502da8fa2a0423ac5e904 /src/backend/executor/execMain.c | |
parent | e2c8100e60729368c84e9a49ada9b44df5a1b851 (diff) | |
download | postgresql-4132dbec69dd4d437e132e57a74a98a40cdcf776.tar.gz postgresql-4132dbec69dd4d437e132e57a74a98a40cdcf776.zip |
Fix partitioning crashes during error reporting.
In various places where we reverse-map a tuple before calling
ExecBuildSlotValueDescription, we neglected to ensure that the
slot descriptor matched the tuple stored in it.
Amit Langote and Amit Khandekar, reviewed by Etsuro Fujita
Discussion: http://postgr.es/m/CAJ3gD9cqpP=WvJj=dv1ONkPWjy8ZuUaOM4_x86i3uQPas=0_jg@mail.gmail.com
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index b22de785167..78cbcd1a324 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -1879,6 +1879,7 @@ ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, if (map != NULL) { tuple = do_convert_tuple(tuple, map); + ExecSetSlotDescriptor(slot, tupdesc); ExecStoreTuple(tuple, slot, InvalidBuffer, false); } } @@ -1956,6 +1957,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, if (map != NULL) { tuple = do_convert_tuple(tuple, map); + ExecSetSlotDescriptor(slot, tupdesc); ExecStoreTuple(tuple, slot, InvalidBuffer, false); } } @@ -2003,6 +2005,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, if (map != NULL) { tuple = do_convert_tuple(tuple, map); + ExecSetSlotDescriptor(slot, tupdesc); ExecStoreTuple(tuple, slot, InvalidBuffer, false); } } @@ -2112,6 +2115,7 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, if (map != NULL) { tuple = do_convert_tuple(tuple, map); + ExecSetSlotDescriptor(slot, tupdesc); ExecStoreTuple(tuple, slot, InvalidBuffer, false); } } |