I wrote: > Now that I've looked this over I'm starting to feel uncomfortable > again, because we can't actually be quite sure about how the remote > parser's heuristic will act.
Actually ... we could make that a lot safer by insisting that the other input be a plain Var, which'd necessarily be a column of the foreign table. That would still cover most cases of practical interest, I think, and it would remove any question of whether implicit coercions had snuck in. It's more restrictive than I'd really like, but I think it's less likely to cause problems. regards, tom lane