Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> writes:
> BTW, Is adding foreign server oid to RelOptInfo acceptable?
No objection here.
> This field
> is set in build_simple_rel() or build_join_rel() if the RelOptInfo
> itself is a foreign scan, or it is a foreign join and both inner and
> outer RelOptInfo have same and valid foreign server oid.
I think you mean "if all the base rels in the join rel come from the
same foreign server".
regards, tom lane