I have established a foreign data wrapper to a second Postgres database and imported the foreign schema. Now, when I attempt to insert a row to one of the foreign tables from my primary database it hits a function called on the insert trigger. This trigger is checking another table that exists on the foreign table but it says the "relation "the_other_table" does not exist. I can select from it from the primary database but while executing the trigger it cannot see it.
I tried with the two schemas being the same name then reimported the schema to a different name and still nothing. It is as though it is executing the trigger on my primary but not knowing where to look for the other table.
Any ideas?