I found another bug in error handling of whole-row references in join pushdown; conversion_error_callback fails to take into account that get_relid_attribute_name(Oid relid, AttrNumber attnum) can't handle whole-row references (ie, attnum=0), in which case that would cause cache lookup errors. Attached is a small patch to address this issue.
Do you have any testcase reproducing the bug here? It would be good to include that test in the regression.
There is a always a possibility that a user would create a table (which can be used as target for the foreign table) with column named 'wholerow', in which case s/he will get confused with this error message.
--
Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company