Cant use airtable table as foreign table?

Complete noob of PostgreSQL here so begging for patience I created the airtable wrapper and it is succesfully pulling my airtable table, which is great, however, I cant get to use it as a foreign table from my "Events" table, I wonder if I should just pull out of it directly from the external application I'm looking to use If its important to know, I put all the tables in my public schema, the wrapper stats are showing, which I think its made automatically, but not the airtable table, why?
No description
No description
3 Replies
garyaustin
garyaustin4w ago
That is documented somewhere that wrappers (foreign tables) can't have fk references.
Necromenta
NecromentaOP4w ago
damn so only option is to query directly from them?
garyaustin
garyaustin4w ago
You could use a function to "join" data and return as a table. Can't remember if a view could join a normal table and foreign table or not.
SQL joins work fine, but the REST API depends on a foreign key for its joins. The problem with foreign keys is they are not just used by the REST API to join, they are meant to enforce values match between the two columns and it would be killer to go fetch them constantly to check.

Did you find this page helpful?