Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> My main concern was actually whether we ought to be detecting this
> earlier in the process, before it gets as far as the executor.
Yeah, that might be an appropriate response too. The executor is
coded so cavalierly because it expects the planner to have replaced
the CURRENT OF node with something executable. As things now stand,
whether that happens or not depends in part on the behavior of FDWs,
so maybe we'd better have the planner check whether it happened.
I'm not sure though if there's any suitably-painless place to do it.
regards, tom lane