From: Tom Lane <t...@sss.pgh.pa.us> > The "single target table" could be partitioned, in which case there'll be > multiple resultrelinfos, some of which could be foreign tables.
Thank you. I thought so at first, but later I found that ExecInsert() only handles one element in mtstate->resultRelInfo. So I thought just the first element is processed in INSERT case. I understood (guessed) the for loop is for UPDATE and DELETE. EXPLAIN without ANALYZE UPDATE/DELETE on a partitioned table shows partitions, which would be mtstate->resultRelInfo. EXPLAIN on INSERT doesn't show partitions, so I think INSERT will find relevant partitions based on input rows during execution. Regards Takayuki Tsunakawa