"tsunakawa.ta...@fujitsu.com" <tsunakawa.ta...@fujitsu.com> writes: > Just for learning, could anyone tell me what this loop for? I thought > current Postgres's DML supports a single target table, so it's enough to > handle the first element of mtstate->resultRelInfo.
The "single target table" could be partitioned, in which case there'll be multiple resultrelinfos, some of which could be foreign tables. regards, tom lane