PlannedStmt->resultRelations was an integer list of range table indexes
because at the time it was added (to Query), the Bitmapset data type did
not yet exist in Postgres.
0f4c170cf3b added a Bitmapset of result relations, so remove the integer
list of RTIs and use the more compact resultRelationRelids.
Discussion: https://postgr.es/m/CAApHDvqAOeOwCKh9g0gfxWa040%3DHyc7_oA%3DC59rjod8kXJDWyw%40mail.gmail.com
overexplain_bitmapset("Unprunable RTIs", plannedstmt->unprunableRelids,
es);
if (es->format != EXPLAIN_FORMAT_TEXT ||
- plannedstmt->resultRelations != NIL)
- overexplain_intlist("Result RTIs", plannedstmt->resultRelations, es);
+ !bms_is_empty(plannedstmt->resultRelationRelids))
+ overexplain_bitmapset("Result RTIs", plannedstmt->resultRelationRelids,
+ es);
/* Close group, we're all done */
ExplainCloseGroup("Range Table", "Range Table", false, es);
pstmt->rtable = estate->es_range_table;
pstmt->unprunableRelids = estate->es_unpruned_relids;
pstmt->permInfos = estate->es_rteperminfos;
- pstmt->resultRelations = NIL;
pstmt->appendRelations = NIL;
pstmt->planOrigin = PLAN_STMT_INTERNAL;
bool
ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
{
- return list_member_int(estate->es_plannedstmt->resultRelations, scanrelid);
+ return bms_is_member(scanrelid, estate->es_plannedstmt->resultRelationRelids);
}
/* ----------------------------------------------------------------
glob->prunableRelids);
result->permInfos = glob->finalrteperminfos;
result->subrtinfos = glob->subrtinfos;
- result->resultRelations = glob->resultRelations;
result->appendRelations = glob->appendRelations;
result->subplans = glob->subplans;
result->rewindPlanIDs = glob->rewindPlanIDs;
*/
List *permInfos;
- /* rtable indexes of target relations for INSERT/UPDATE/DELETE/MERGE */
- /* integer list of RT indexes, or NIL */
- List *resultRelations;
-
/* RT indexes of relations targeted by INSERT/UPDATE/DELETE/MERGE */
Bitmapset *resultRelationRelids;